Skip to content

Commit

Permalink
Merge pull request #3921 from shalommeoded/SUP-15794_UnmuteButton_on_…
Browse files Browse the repository at this point in the history
…NativeIOS_player

Fix(SUP-15794): Issue with the "Unmute" button showing on Native IOS Player
  • Loading branch information
shalomm-gloat authored Nov 27, 2018
2 parents 7298fb1 + 21c1595 commit 07c1b54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions modules/MwEmbedSupport/mediawiki/mediawiki.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@
return mw.isSafariVersionGreaterThan(8);
};

mw.isNativeIOSPlayback = function() {
return mw.isIOS() && !mw.isIpad() && !mw.getConfig('EmbedPlayer.WebKitPlaysInline');
};

mw.isSilk = function () {
return /\bSilk\b/.test(userAgent);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
if (mw.getConfig('thumbEmbedOrigin') || mw.getConfig('autoMute')) {
return false;
}
if (mw.isMobileDevice()) {
if (mw.isMobileDevice() && !mw.isNativeIOSPlayback()) {
return !!mw.getConfig('mobileAutoPlay');
} else {
return browserSupportMutedAutoplay() && isAutoplayConfigured();
Expand Down

0 comments on commit 07c1b54

Please sign in to comment.