aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-04-18 08:49:05 +1000
committerGitHub <noreply@github.com>2018-04-18 08:49:05 +1000
commit56d1be944720a98aad0de52de83ac561af21e93b (patch)
tree97cce52a8dd621d712950677b097a37cf499f77e /src/js
parenta241cb52154afb746d6151e27093f89ab75badd2 (diff)
parent6d79b8cd4cb3b256ee5616ffc196c87cf74bf6f8 (diff)
downloadplyr-56d1be944720a98aad0de52de83ac561af21e93b.tar.lz
plyr-56d1be944720a98aad0de52de83ac561af21e93b.tar.xz
plyr-56d1be944720a98aad0de52de83ac561af21e93b.zip
Merge pull request #903 from friday/901
Show captions even if toggle button is omitted from controls
Diffstat (limited to 'src/js')
-rw-r--r--src/js/captions.js5
-rw-r--r--src/js/plyr.js4
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;
}