Fix display for current language on change
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user