Skip to content

Commit 9478cc9

Browse files
author
Rob Walch
committed
Remove live stream middle segment guess (matches v0.14.0)
1 parent 6046e48 commit 9478cc9

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/controller/base-stream-controller.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -463,13 +463,6 @@ export default class BaseStreamController extends TaskLoop {
463463
}
464464
}
465465

466-
// If no fragment has been selected by this point, load any one
467-
if (!frag) {
468-
const len = fragments.length;
469-
frag = fragments[Math.min(len - 1, Math.round(len / 2))];
470-
this.log(`Live playlist, switching playlist, unknown, load middle frag : ${frag!.sn}`);
471-
}
472-
473466
return frag;
474467
}
475468

src/controller/level-controller.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,16 +441,14 @@ export default class LevelController implements NetworkComponentAPI {
441441
}
442442

443443
protected onAudioTrackSwitched (event: Events.AUDIO_TRACK_SWITCHED, data: TrackSwitchedData) {
444-
const audioGroupId = this.hls.audioTracks[data.id].groupId;
445-
446444
const currentLevel = this.hls.levels[this.currentLevelIndex as number];
447445
if (!currentLevel) {
448446
return;
449447
}
450448

451449
if (currentLevel.audioGroupIds) {
452450
let urlId = -1;
453-
451+
const audioGroupId = this.hls.audioTracks[data.id].groupId;
454452
for (let i = 0; i < currentLevel.audioGroupIds.length; i++) {
455453
if (currentLevel.audioGroupIds[i] === audioGroupId) {
456454
urlId = i;

0 commit comments

Comments
 (0)