fix being unable to unmute autoplayed video on IOS

This commit is contained in:
Suman Bhattarai 2019-12-03 10:34:27 -07:00
parent 74e3990604
commit 42d72c5303
2 changed files with 1 additions and 8 deletions

2
src/js/controls.js vendored
View File

@ -1380,7 +1380,7 @@ const controls = {
} }
// Volume range control // Volume range control
if (control === 'volume') { if (control === 'volume' && !browser.isIos) {
// Set the attributes // Set the attributes
const attributes = { const attributes = {
max: 1, max: 1,

View File

@ -23,13 +23,6 @@
} }
} }
// Hide sound controls on iOS
// It's not supported to change volume using JavaScript:
// https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html
.plyr--is-ios .plyr__volume {
display: none !important;
}
// Vimeo has no toggle mute method so hide mute button // Vimeo has no toggle mute method so hide mute button
// https://github.com/vimeo/player.js/issues/236#issuecomment-384663183 // https://github.com/vimeo/player.js/issues/236#issuecomment-384663183
.plyr--is-ios.plyr--vimeo [data-plyr='mute'] { .plyr--is-ios.plyr--vimeo [data-plyr='mute'] {