Skip to content

Commit

Permalink
Account for invalid starttime values when calling attachSource (#4092)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Nov 30, 2022
1 parent 4fad9f6 commit 0236656
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/streaming/MediaPlayer.js
Expand Up @@ -1851,6 +1851,12 @@ function MediaPlayer() {
uriFragmentModel.initialize(urlOrManifest);
}

if (startTime == null || isNaN(startTime)) {
startTime = NaN;
}

startTime = Math.max(0, startTime);

source = urlOrManifest;

if (streamingInitialized || playbackInitialized) {
Expand Down

0 comments on commit 0236656

Please sign in to comment.