Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Only reset the seek target if a valid segment request has been found (D…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy authored and jeffcunat committed Jul 6, 2020
1 parent 7b58838 commit 845ec4d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/streaming/StreamProcessor.js
Expand Up @@ -455,13 +455,15 @@ function StreamProcessor(config) {
// Don't schedule next fragments while pruning to avoid buffer inconsistencies
if (!bufferController.getIsPruningInProgress()) {
request = findNextRequest(e.seekTarget, e.replacement);
scheduleController.setSeekTarget(NaN);
if (request && !e.replacement) {
if (!isNaN(request.startTime + request.duration)) {
setIndexHandlerTime(request.startTime + request.duration);
if (request) {
scheduleController.setSeekTarget(NaN);
if (!e.replacement) {
if (!isNaN(request.startTime + request.duration)) {
setIndexHandlerTime(request.startTime + request.duration);
}
request.delayLoadingTime = new Date().getTime() + scheduleController.getTimeToLoadDelay();
scheduleController.setTimeToLoadDelay(0);
}
request.delayLoadingTime = new Date().getTime() + scheduleController.getTimeToLoadDelay();
scheduleController.setTimeToLoadDelay(0);
}
}

Expand Down

0 comments on commit 845ec4d

Please sign in to comment.