Skip to content

Commit

Permalink
fix(UI): UI does not update after loading a new stream (#6721)
Browse files Browse the repository at this point in the history
Fixes #6720
  • Loading branch information
avelad authored and joeyparrish committed May 31, 2024
1 parent f4f2f30 commit 6d9ddb1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/audio_language_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ shaka.ui.AudioLanguageSelection = class extends shaka.ui.SettingsMenu {
});


this.eventManager.listen(this.player, 'loading', () => {
this.onTracksChanged_();
});

this.eventManager.listen(this.player, 'trackschanged', () => {
this.onTracksChanged_();
});
Expand Down
4 changes: 4 additions & 0 deletions ui/resolution_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
});


this.eventManager.listen(this.player, 'loading', () => {
this.updateResolutionSelection_();
});

this.eventManager.listen(this.player, 'variantchanged', () => {
this.updateResolutionSelection_();
});
Expand Down
4 changes: 4 additions & 0 deletions ui/text_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
this.updateTextLanguages_();
});

this.eventManager.listen(this.player, 'loading', () => {
this.onTracksChanged_();
});

this.eventManager.listen(this.player, 'texttrackvisibility', () => {
this.onCaptionStateChange_();
this.updateTextLanguages_();
Expand Down

0 comments on commit 6d9ddb1

Please sign in to comment.