Skip to content

Commit a885a74

Browse files
authored
Prevent loading of audio media options with the same URI as the current level (#6785)
Resolves #6783
1 parent 8593c31 commit a885a74

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/controller/audio-track-controller.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,17 @@ class AudioTrackController extends BasePlaylistController {
404404

405405
protected loadPlaylist(hlsUrlParameters?: HlsUrlParameters): void {
406406
const audioTrack = this.currentTrack;
407-
if (this.shouldLoadPlaylist(audioTrack) && audioTrack) {
407+
if (!audioTrack) {
408+
return;
409+
}
410+
let url = audioTrack.url;
411+
if (
412+
this.shouldLoadPlaylist(audioTrack) &&
413+
url !== this.hls.levels[this.hls.loadLevel]?.uri
414+
) {
408415
super.loadPlaylist();
409416
const id = audioTrack.id;
410417
const groupId = audioTrack.groupId as string;
411-
let url = audioTrack.url;
412418
if (hlsUrlParameters) {
413419
try {
414420
url = hlsUrlParameters.addDirectives(url);

0 commit comments

Comments
 (0)