From 6d79b8cd4cb3b256ee5616ffc196c87cf74bf6f8 Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Tue, 17 Apr 2018 18:56:58 +0200 Subject: [PATCH 1/2] Don't require captions toggle button to be enabled in order to show captions --- src/js/captions.js | 5 ----- src/js/plyr.js | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/js/captions.js b/src/js/captions.js index 45efcf40..c6618fda 100644 --- a/src/js/captions.js +++ b/src/js/captions.js @@ -250,11 +250,6 @@ const captions = { // Display captions container and button (for initialization) show() { - // If there's no caption toggle, bail - if (!utils.is.element(this.elements.buttons.captions)) { - return; - } - // Try to load the value from storage let active = this.storage.get('captions'); diff --git a/src/js/plyr.js b/src/js/plyr.js index 181b4bf3..111742f8 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -845,8 +845,8 @@ class Plyr { * @param {boolean} input - Whether to enable captions */ toggleCaptions(input) { - // If there's no full support, or there's no caption toggle - if (!this.supported.ui || !utils.is.element(this.elements.buttons.captions)) { + // If there's no full support + if (!this.supported.ui) { return; } From 042b1a82941dac194a02f62256b1a965ee656730 Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Tue, 17 Apr 2018 20:28:47 +0200 Subject: [PATCH 2/2] Fullscreen aria-pressed event listened fix for Chrome --- src/js/fullscreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/fullscreen.js b/src/js/fullscreen.js index 857a2edc..8795f460 100644 --- a/src/js/fullscreen.js +++ b/src/js/fullscreen.js @@ -90,7 +90,7 @@ class Fullscreen { static get prefix() { // No prefix if (utils.is.function(document.exitFullscreen)) { - return false; + return ''; } // Check for fullscreen support by vendor prefix