diff options
Diffstat (limited to 'src/js/captions.js')
-rw-r--r-- | src/js/captions.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/js/captions.js b/src/js/captions.js index ed175530..c5b45b40 100644 --- a/src/js/captions.js +++ b/src/js/captions.js @@ -5,6 +5,7 @@ import support from './support'; import utils from './utils'; import controls from './controls'; +import storage from './storage'; const captions = { // Setup captions @@ -15,16 +16,16 @@ const captions = { } // Set default language if not set - if (!utils.is.empty(this.storage.language)) { - this.captions.language = this.storage.language; + if (!utils.is.empty(storage.get.call(this).language)) { + this.captions.language = storage.get.call(this).language; } else if (utils.is.empty(this.captions.language)) { this.captions.language = this.config.captions.language.toLowerCase(); } // Set captions enabled state if not set if (!utils.is.boolean(this.captions.enabled)) { - if (!utils.is.empty(this.storage.language)) { - this.captions.enabled = this.storage.captions; + if (!utils.is.empty(storage.get.call(this).language)) { + this.captions.enabled = storage.get.call(this).captions; } else { this.captions.enabled = this.config.captions.active; } @@ -193,7 +194,7 @@ const captions = { } // Try to load the value from storage - let active = this.storage.captions; + let active = storage.get.call(this).captions; // Otherwise fall back to the default config if (!utils.is.boolean(active)) { |