Skip to content

Commit

Permalink
fix: Match audioCodec by first 4 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Oct 20, 2024
1 parent a757694 commit 209413b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/player/src/facade/state-observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ export class StateObserver {

const idx = this.hls.levels.findIndex((level) => {
return (
level.height === height && level.audioCodec === loadLevel.audioCodec
level.height === height &&
level.audioCodec?.substring(0, 4) ===
loadLevel.audioCodec?.substring(0, 4)
);
});

Expand Down

0 comments on commit 209413b

Please sign in to comment.