Seeking to video end in Firefox and Safari crashes Shaka
See original GitHub issueWhen I seek past the end in FF or Safari, the progress bar disappears and the video doesn’t seek or play anymore.
Have you read the FAQ and checked for duplicate open issues? There’s a similar issue (#1363), but that was blamed on a (fixed) Safari Bug. This happens in Firefox also.
What version of Shaka Player are you using? 2.5.1
Can you reproduce the issue with our latest release version? Yip
Can you reproduce the issue with the latest code from master? Didn’t try
Are you using the demo app or your own custom app? Problem happens in both
If custom app, can you reproduce the issue using our demo app? Yes
What browser and OS are you using? Firefox 67 (recent versions of Mac OS, Windows, Fedora, Android) Safari 12.1.1 (recent version of Mac OS)
Could not reproduce either in Chrome or the Microsoft Browsers (no, not even in IE11 ^^)
What did you do? Begin playing the stream Seek to (or past) the very end. Try a few times, move mouse back and forth.
What did you expect to happen? That the last frame is displayed and the player stops, but keeps its functionality
What actually happens? The progress bar disappears, errors are displayed in console:
Assertion failed: duration must be > 0 presentation_timeline.js:127:16 Failed to move playhead from 0 to -1 video_wrapper.js:278:17
(Firefox)
[Error] Unhandled Promise Rejection: shaka.util.Error { "severity": 2, "category": 3, "code": 3015, "data": [ { "line": 714, "column": 36, "sourceURL": "https://shaka-player-demo.appspot.com/lib/media/media_source_engine.js" } ], "handled": false, "message": "Shaka Error MEDIA.MEDIA_SOURCE_OPERATION_THREW (InvalidStateError: The object is in an invalid state.)", "stack": "Error@https://shaka-player-demo.appspot.com/lib/util/error.js:88:22\nhttps://shaka-player-demo.appspot.com/lib/media/media_source_engine.js:1006:48\n[native code]\npromiseReactionJob@[native code]" } (anonymous function) promiseReactionJob
(Safari)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)

Top Related StackOverflow Question
I was able to reproduce occasionally. You need to drag the slider past the end to get it. It appears to be a browser bug where the
MediaSource.durationvalue has been reset to 0 for some reason, even though we didn’t change it. I can add a fix to ignore this case.So you seem to be the lucky one who is on a system where it’s working. 😃 Or maybe you can actually reproduce the problem if you try some more. In the video I recorded you can see it takes some time, but at other times it happens pretty quick. Did you notice the error message
Assertion failed: duration must be > 0 (presentation_timeline.js:127:16)in my video? Maybe that is more relevant to the issue.