-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Dash sources not loading on 5.10.2+ #3428
Comments
Also, i'm pretty sure this issue videojs/videojs-contrib-dash#90 has the same cause |
Interesting. Thanks for digging in and finding the root cause. It does sound like the repetitive loadstarts are the issue here. From what I understand, the loadstart event should only ever be fired once. Might be worth also opening up an issue against dashjs itself with this. |
Ditto, we've been using videojs with videojs-contrib-dash for quite a while and also had to revert to vjs 5.9 after trying 5.10 at the weekend to avoid the Media Source error when trying to load the dash source. |
OK, here is the reply from dash.js: |
|
So does dash.js always create a SRC attribute within the video tag, rather than a source child of the video tag? |
I am eating my words and have partially retracted my previous comment, having been looking a bit deeper into how dash.js initialises when presented with a See my comments there for what is going on. tl;dr there is a bug, but it's not the root cause of this issue. |
https://jsfiddle.net/jzk1sod9/ shows that, bug aside, |
Currently, dash.js uses the src attribute of the media element to attach the MediaSource object. It is possible to attach that object to the src attribute of a source tag, but I don't think it would make any difference in this scenario. Reference: https://w3c.github.io/media-source/#mediasource-attach |
Thanks Dave, yes, agree it wouldn't make any difference anyway. Am tracking your skipAutoCreate post in dashjs issue: skipAutoCreate before dash.js seems a bit hacky, but will await feedback. I suppose the best solution for players in any event would possibly be to make the canplay decision from an array/object of possible sources (with no source tags pre-written, so using an empty video element), and then either use the dash source selection for dashjs attachment (through the player's sourcehandler), or fallback and create a non-dash source tag then. That should guarantee one loadstart. Anyway, will wait on further thoughts. |
OK, have now eliminated dash.js itself as the root cause. Bottom line is that since VJS 5.10.x the sourcehandling thru contrib-dash now fails. Subsequently most browsers now fall back to default mp4 file, rather than dash. Works fine if I revert to VJS 5.9.0. Not sure if the commits mentioned above are indeed the issue but it's now broken until the culprit is identified and remedied. |
Just tested to establish break point. |
Using programmatic sources solved the problem. Currently I believe that anyone using html source tags will now break dash handling if using VJS 5.10.1+ due to: #3285 |
we saw what may be a similar issue in 5.10.1/5.10.2 and we tracked it down to that PR as well. As of 5.10.3 a fix #3343 was merged which may solve the issue |
The original error was in introduced in 5.10.1 but we still have the same problem as at 5.10.7. Using an array of source objects solves it (which we'll probably stick with), but it would be good to find a definitive fix for anyone still using source tags. |
I wonder if what we should do is check what the video's |
Just wondering if anything has been done on this or if a temporary solution has been given? |
@jemoreno the temporary solution would be to load your dash source with player.src() as seen here https://github.com/videojs/videojs-contrib-dash#getting-started |
The video will load with this fix, however if you try and seek to a later time it locks up and will not play anymore. |
Hey guys, we also encounter this problem and would appreciate a fix. Is there any chance for the PR to be merged soon? |
Is #3906 (which has been released as part of 6.0) a fix for this problem? |
This is fixed as part of 6.0, since we removed the double loadstart code. |
I've stumbled upon an issue in videojs 5.10.2+ and dash. The dash sources are not loading most of the times.
It actually depends on how fast the manifest is loaded i think. Small and quick manifests load up normally much frequently than the big or slow ones. Once network throttling is set to slow (3G for example) then the small start to fail as well.
Here is the test case: http://jsbin.com/yesexuxeqe/edit?html,console,output
Note: if videojs version 5.10.2 is replaced with 5.9.2, it works okay every time.
After some investigation i've managed to pinpoint the error to this pr: #3285
Here is a normal startup flow (i've added additional log entries for loadstart events and firstLoadStartListener, successiveLoadStartListener functions):
Here is a broken one:
Mentioned pr introduced a feature to dispose source handlers on repetitive loadstart events. And in case of slow dash manifest - loadstart is actually fired twice which causes source handler to be disposed before it can even initiate the playback.
I have not had time to dig up the cause of repetitive loadstart event yet. Maybe someone can shed some light on why's that happening?
The text was updated successfully, but these errors were encountered: