diff --git a/contrib/akamai/controlbar/ControlBar.js b/contrib/akamai/controlbar/ControlBar.js index 08353979f9..cd18558b6a 100644 --- a/contrib/akamai/controlbar/ControlBar.js +++ b/contrib/akamai/controlbar/ControlBar.js @@ -840,7 +840,7 @@ var ControlBar = function (dashjsMediaPlayer, displayUTCTimeCodes) { } break; case 'image-bitrate-list': - player.setQualityFor(self.mediaType, self.index); + player.setQualityFor(item.mediaType, item.index); break; case 'caption-list': self.player.setTextTrack(item.index - 1); diff --git a/src/streaming/thumbnail/ThumbnailController.js b/src/streaming/thumbnail/ThumbnailController.js index 1a375d6c41..28a05a9299 100644 --- a/src/streaming/thumbnail/ThumbnailController.js +++ b/src/streaming/thumbnail/ThumbnailController.js @@ -62,6 +62,11 @@ function ThumbnailController(config) { function initialize() { thumbnailTracks.addTracks(); + const tracks = thumbnailTracks.getTracks(); + + if (tracks && tracks.length > 0) { + setTrackByIndex(0); + } } function getStreamId() { diff --git a/src/streaming/thumbnail/ThumbnailTracks.js b/src/streaming/thumbnail/ThumbnailTracks.js index b9b4f5be56..08f897c021 100644 --- a/src/streaming/thumbnail/ThumbnailTracks.js +++ b/src/streaming/thumbnail/ThumbnailTracks.js @@ -125,7 +125,6 @@ function ThumbnailTracks(config) { if (tracks.length > 0) { // Sort bitrates and select the lowest bitrate rendition tracks.sort((a, b) => a.bitrate - b.bitrate); - currentTrackIndex = tracks.length - 1; } }