diff options
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/controls.js | 4 | ||||
-rw-r--r-- | src/js/listeners.js | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/js/controls.js b/src/js/controls.js index 7993dcb8..15c82716 100644 --- a/src/js/controls.js +++ b/src/js/controls.js @@ -139,7 +139,7 @@ const controls = { // Create hidden text label createLabel(key, attr = {}) { const text = i18n.get(key, this.config); - const attributes = { ...attr, class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' '),}; + const attributes = { ...attr, class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ') }; return createElement('span', attributes, text); }, @@ -1378,6 +1378,8 @@ const controls = { } // Volume range control + // Ignored on iOS as it's handled globally + // https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html if (control === 'volume' && !browser.isIos) { // Set the attributes const attributes = { diff --git a/src/js/listeners.js b/src/js/listeners.js index 643b7dd3..f6b01763 100644 --- a/src/js/listeners.js +++ b/src/js/listeners.js @@ -377,13 +377,6 @@ class Listeners { controls.durationUpdate.call(player, event), ); - // Check for audio tracks on load - // We can't use `loadedmetadata` as it doesn't seem to have audio tracks at that point - on.call(player, player.media, 'canplay loadeddata', () => { - toggleHidden(elements.volume, !player.hasAudio); - toggleHidden(elements.buttons.mute, !player.hasAudio); - }); - // Handle the media finishing on.call(player, player.media, 'ended', () => { // Show poster on end |