Skip to content

Commit

Permalink
Prevent loading of audio media options with the same URI as the curre…
Browse files Browse the repository at this point in the history
…nt level (#6785)

Resolves #6783
  • Loading branch information
robwalch authored Nov 14, 2024
1 parent 8593c31 commit a885a74
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/controller/audio-track-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,17 @@ class AudioTrackController extends BasePlaylistController {

protected loadPlaylist(hlsUrlParameters?: HlsUrlParameters): void {
const audioTrack = this.currentTrack;
if (this.shouldLoadPlaylist(audioTrack) && audioTrack) {
if (!audioTrack) {
return;
}
let url = audioTrack.url;
if (
this.shouldLoadPlaylist(audioTrack) &&
url !== this.hls.levels[this.hls.loadLevel]?.uri
) {
super.loadPlaylist();
const id = audioTrack.id;
const groupId = audioTrack.groupId as string;
let url = audioTrack.url;
if (hlsUrlParameters) {
try {
url = hlsUrlParameters.addDirectives(url);
Expand Down

0 comments on commit a885a74

Please sign in to comment.