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

Resolves #6783
  • Loading branch information
robwalch committed Oct 22, 2024
1 parent 7afdcff commit 85201f0
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 85201f0

Please sign in to comment.