Fix display for current language on change

This commit is contained in:
Sam Potts
2017-11-25 01:19:16 +11:00
parent cda574e627
commit fd77831303
9 changed files with 35 additions and 26 deletions

View File

@ -282,6 +282,12 @@ const listeners = {
);
}
// Volume change
utils.on(this.media, 'volumechange', () => {
// Save to storage
storage.set.call(this, { volume: this.volume, muted: this.muted });
});
// Speed change
utils.on(this.media, 'ratechange', () => {
// Update UI
@ -302,16 +308,13 @@ const listeners = {
// Caption language change
utils.on(this.media, 'languagechange', () => {
// Update UI
controls.updateSetting.call(this, 'captions');
// Save to storage
storage.set.call(this, { language: this.language });
});
// Volume change
utils.on(this.media, 'volumechange', () => {
// Save to storage
storage.set.call(this, { volume: this.volume, muted: this.muted });
});
// Captions toggle
utils.on(this.media, 'captionsenabled captionsdisabled', () => {
// Update UI