From 5dd08e8aa0c933fe18b1b4fccd5a8f53deeaf8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=CC=81lvaro=20Velad=20Galva=CC=81n?= Date: Fri, 31 May 2024 12:44:10 +0200 Subject: [PATCH] fix(UI): UI does not update after loading a new stream --- ui/audio_language_selection.js | 4 ++++ ui/resolution_selection.js | 4 ++++ ui/text_selection.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/ui/audio_language_selection.js b/ui/audio_language_selection.js index 77e94e642c..624052eb3d 100644 --- a/ui/audio_language_selection.js +++ b/ui/audio_language_selection.js @@ -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_(); }); diff --git a/ui/resolution_selection.js b/ui/resolution_selection.js index 6dd861c8ee..1bcaef51e4 100644 --- a/ui/resolution_selection.js +++ b/ui/resolution_selection.js @@ -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_(); }); diff --git a/ui/text_selection.js b/ui/text_selection.js index b7b23a570f..4e9ef60a41 100644 --- a/ui/text_selection.js +++ b/ui/text_selection.js @@ -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_();