Skip to content

Commit b7ffa46

Browse files
committed
stream-controller: check audio codec is defined before comparison
1 parent 0561b3d commit b7ffa46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controller/stream-controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ export default class StreamController
12221222
}
12231223
}
12241224
// HE-AAC is broken on Android, always signal audio codec as AAC even if variant manifest states otherwise
1225-
if (audioCodec.indexOf('mp4a.40.5') !== -1) {
1225+
if (audioCodec && audioCodec.indexOf('mp4a.40.5') !== -1) {
12261226
if (ua.indexOf('android') !== -1 && audio.container !== 'audio/mpeg') {
12271227
// Exclude mpeg audio
12281228
audioCodec = 'mp4a.40.2';

0 commit comments

Comments
 (0)