diff --git a/ui/component/viewers/videoViewer/internal/plugins/videojs-hls-quality-selector/plugin.js b/ui/component/viewers/videoViewer/internal/plugins/videojs-hls-quality-selector/plugin.js index 2eca32632..58a065c44 100644 --- a/ui/component/viewers/videoViewer/internal/plugins/videojs-hls-quality-selector/plugin.js +++ b/ui/component/viewers/videoViewer/internal/plugins/videojs-hls-quality-selector/plugin.js @@ -46,9 +46,11 @@ class HlsQualitySelectorPlugin { // Listen for source changes this.player.on('loadedmetadata', (e) => { + const { qualityToSet, switchedFromDefaultQuality, claimSrcVhs } = this.player; + // if there was a quality option selected to default to, set it using the setQuality function // as if it was being clicked on, on loadedmetadata - if (this.player.qualityToSet && !this.player.switchedFromDefaultQuality) { + if (qualityToSet && !switchedFromDefaultQuality && claimSrcVhs) { this.setQuality(this.player.qualityToSet); // Add this attribute to the video player so later it can be checked and avoid switching again diff --git a/ui/component/viewers/videoViewer/view.jsx b/ui/component/viewers/videoViewer/view.jsx index b0bdc85bd..9d504588d 100644 --- a/ui/component/viewers/videoViewer/view.jsx +++ b/ui/component/viewers/videoViewer/view.jsx @@ -229,9 +229,11 @@ function VideoViewer(props: Props) { [collectionId, doPlayUri, isFloating, push] ); + /** handle play next/play previous buttons **/ useEffect(() => { if (!doNavigate) return; + // playNextUrl is set (either true or false) when the Next/Previous buttons are clicked const shouldPlayNextUrl = playNextUrl && nextRecommendedUri && permanentUrl !== nextRecommendedUri; const shouldPlayPreviousUrl = !playNextUrl && previousListUri && permanentUrl !== previousListUri;