diff options
author | Albin Larsson <mail@albinlarsson.com> | 2018-06-15 06:06:16 +0200 |
---|---|---|
committer | Albin Larsson <mail@albinlarsson.com> | 2018-06-15 06:07:04 +0200 |
commit | 19e412a73ac2e3e9f4c6ac9a086557a936109287 (patch) | |
tree | b09bd6de2ae5b234a8ff344c42da9ef313421a68 /src/js/controls.js | |
parent | cf5f77c709b4ca1526e878fdc118fbedd593ef85 (diff) | |
download | plyr-19e412a73ac2e3e9f4c6ac9a086557a936109287.tar.lz plyr-19e412a73ac2e3e9f4c6ac9a086557a936109287.tar.xz plyr-19e412a73ac2e3e9f4c6ac9a086557a936109287.zip |
Add 'passive' flag to internal captions methods to avoid overriding user preferences, support multiple browser languages (get first match) and improve comments
Diffstat (limited to 'src/js/controls.js')
-rw-r--r-- | src/js/controls.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/controls.js b/src/js/controls.js index f645e351..e601a03a 100644 --- a/src/js/controls.js +++ b/src/js/controls.js @@ -848,7 +848,7 @@ const controls = { // Generate options data const options = tracks.map((track, value) => ({ value, - checked: this.captions.active && this.currentTrack === value, + checked: this.captions.toggled && this.currentTrack === value, title: captions.getLabel.call(this, track), badge: track.language && controls.createBadge.call(this, track.language.toUpperCase()), list, @@ -858,7 +858,7 @@ const controls = { // Add the "Disabled" option to turn off captions options.unshift({ value: -1, - checked: !this.captions.active, + checked: !this.captions.toggled, title: i18n.get('disabled', this.config), list, type: 'language', |