New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: TypeError: Cannot read property 'duration' of undefined #987
Comments
This happens to me as well if I watch a live HLS stream, stop the stream and the player tries to connect to the stream again but it fails with this message. VIDEOJS: ERROR: TypeError: Cannot read property 'duration' of undefined I'm using Chrome: Version 87.0.4280.88 (Offizieller Build) (x86_64) |
@renepardon are you able to reproduce and post how the HLS manifest looks like before and after the stream reconnection? Thanks. |
@gkatsev here's a sequence of how the manifest file looks like under the scenario of nginx-rtmp restart. The result is the "Cannot read property 'duration' of undefined" after the new manifest is returned:
|
No fix found for this issue yet? I'm using
|
Hi, Wie video.js on the other hand the m3u8 file which the player can not resume from looks like this:
So I have 10 segments each of 3s. Keyframe interval in OBS is 2s. I changed to 3s now for testing purpose. The console is spammed full of those errors now: Would be nice if there is a way to detect/catch this duration error and let the player resume at the most recent frame. |
So, looking at the sample in #987 (comment), that is bad content. The media-sequence being reset to 0 and not having a discontinuity sequence number after the discontinuity tag has been removed from the playlist makes it invalid content. It isn't something we can support fixing. Have to say I'm surprised it recovers for you @renepardon. Are you able to capture the manifest right before and right after the encoder stops and starts again? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please do not delete the template, by filling out the required information we can investigate your issue more quickly.
Before opening an issue see if your problem can be resolved with the troubleshooting guide.
video.min.js:12 VIDEOJS: ERROR: TypeError: Cannot read property 'duration' of undefined
at G (videojs-http-streaming.min.js:2)
at t.i.getExpiredTime (videojs-http-streaming.min.js:3)
at t.r.stuckAtPlaylistEnd_ (videojs-http-streaming.min.js:7)
at t. (videojs-http-streaming.min.js:7)
at t.o.dispatcher.o.dispatcher (video.min.js:12)
at pe (video.min.js:12)
at t.ye.dispatchEvent.ye.trigger (video.min.js:12)
at t.n.haveMetadata (videojs-http-streaming.min.js:2)
at videojs-http-streaming.min.js:2
at te (videojs-http-streaming.min.js:2)
(anonymous) @ video.min.js:12
Chrome. Might be related to #985
The text was updated successfully, but these errors were encountered: