Skip to content

Commit 6d1bb4f

Browse files
grabofusrobwalch
authored andcommitted
fix: seek during startup on low power devices
1 parent 22436c2 commit 6d1bb4f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/controller/stream-controller.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,11 @@ export default class StreamController
733733
return;
734734
}
735735
const liveSyncPosition = this.hls.liveSyncPosition;
736-
const currentTime = media.currentTime;
736+
const mediaCurrentTime = media.currentTime;
737+
const currentTime =
738+
this.hasEnoughToStart || mediaCurrentTime > 0
739+
? mediaCurrentTime
740+
: this.startPosition;
737741
const start = levelDetails.fragmentStart;
738742
const end = levelDetails.edge;
739743
const withinSlidingWindow =

0 commit comments

Comments
 (0)