Skip to content

Commit

Permalink
nav.plat is dead
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Mar 3, 2024
1 parent 63db2dc commit e6b1e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lite-yt-embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class LiteYTEmbed extends HTMLElement {
const params = new URLSearchParams(this.getAttribute('params') || []);
params.append('autoplay', '1');
params.append('playsinline', '1');
if (/iPad|iPhone|iPod/.test(navigator.platform)) {
if (navigator.vendor.includes('Apple')) {
params.append('mute', '1'); // Mute only if on iPad or iPhone
}
return params;
Expand Down

0 comments on commit e6b1e52

Please sign in to comment.