Skip to content

Commit

Permalink
Fix a regression when providing a posix string as start value to atta…
Browse files Browse the repository at this point in the history
…chSource()
  • Loading branch information
dsilhavy committed Feb 16, 2023
1 parent 4055cc5 commit 40776e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/streaming/MediaPlayer.js
Expand Up @@ -1885,11 +1885,13 @@ function MediaPlayer() {
uriFragmentModel.initialize(urlOrManifest);
}

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

startTime = Math.max(0, startTime);
if (!isNaN(startTime)) {
startTime = Math.max(0, startTime);
}

source = urlOrManifest;

Expand Down

0 comments on commit 40776e7

Please sign in to comment.