Skip to content

Commit

Permalink
do not restart manifest updater once dynamic mpd goes to static (#3401)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbert authored Sep 11, 2020
1 parent 20a1ff1 commit 5a5956e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/streaming/ManifestUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function ManifestUpdater() {
refreshDelay,
refreshTimer,
isPaused,
isStopped,
isUpdating,
manifestLoader,
manifestModel,
Expand Down Expand Up @@ -93,6 +94,7 @@ function ManifestUpdater() {
refreshDelay = NaN;
isUpdating = false;
isPaused = true;
isStopped = false;
stopManifestRefreshTimer();
}

Expand All @@ -116,6 +118,10 @@ function ManifestUpdater() {
function startManifestRefreshTimer(delay) {
stopManifestRefreshTimer();

if (isStopped) {
return;
}

if (isNaN(delay) && !isNaN(refreshDelay)) {
delay = refreshDelay * 1000;
}
Expand Down Expand Up @@ -143,6 +149,8 @@ function ManifestUpdater() {
// Stop manifest update, ignore static manifest and signal end of dynamic stream to detect end of stream
if (manifestModel.getValue() && manifestModel.getValue().type === DashConstants.DYNAMIC && manifest.type === DashConstants.STATIC) {
eventBus.trigger(Events.DYNAMIC_STREAM_COMPLETED);
isUpdating = false;
isStopped = true;
return;
}

Expand Down

0 comments on commit 5a5956e

Please sign in to comment.