diff options
author | Sam Potts <me@sampotts.me> | 2017-11-05 11:45:02 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2017-11-05 11:45:02 +1100 |
commit | 1c693df00b44961674a35243f5172716a3735b71 (patch) | |
tree | 2df8dd8d252d1f80688cd3a3549de7374dca676c /src/js/listeners.js | |
parent | 8aaa9320505baec3575bc1e92f37225729ee88f6 (diff) | |
download | plyr-1c693df00b44961674a35243f5172716a3735b71.tar.lz plyr-1c693df00b44961674a35243f5172716a3735b71.tar.xz plyr-1c693df00b44961674a35243f5172716a3735b71.zip |
src getter fix, local storage fix
Diffstat (limited to 'src/js/listeners.js')
-rw-r--r-- | src/js/listeners.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/js/listeners.js b/src/js/listeners.js index bc1a6094..3d2aba66 100644 --- a/src/js/listeners.js +++ b/src/js/listeners.js @@ -91,9 +91,7 @@ const listeners = { controls.updateSetting.call(this, 'speed'); // Save speed to localStorage - storage.set.call(this, { - speed: this.speed, - }); + storage.set.call(this, { speed: this.speed }); }); // Quality change @@ -102,17 +100,19 @@ const listeners = { controls.updateSetting.call(this, 'quality'); // Save speed to localStorage - storage.set.call(this, { - quality: this.quality, - }); + storage.set.call(this, { quality: this.quality }); }); // Caption language change utils.on(this.media, 'captionchange', () => { // Save speed to localStorage - storage.set.call(this, { - language: this.captions.language, - }); + storage.set.call(this, { language: this.language }); + }); + + // Volume change + utils.on(this.media, 'volumechange', () => { + // Save speed to localStorage + storage.set.call(this, { volume: this.volume }); }); // Captions toggle @@ -121,9 +121,7 @@ const listeners = { controls.updateSetting.call(this, 'captions'); // Save speed to localStorage - storage.set.call(this, { - captions: this.captions.enabled, - }); + storage.set.call(this, { captions: this.captions.enabled }); }); // Proxy events to container |