-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Loadstart event is triggered twice #1491
Comments
This only occurs when setting a The The UA behaviour described seems to be compliant with the spec, and not caused specifically by dash.js, except in one specific case. [1] https://www.w3.org/TR/html5/embedded-content-0.html#loading-the-media-resource (edit) additionally there is a bug which occasionally causes a third |
Some further testing with a bit different setup: Here i've seen different outcomes: 1 loadstart event (with disabled browser cache almost never happens) 3 loadstart events (a bit different) This unstable behavior is exactly what i'm experiencing in latest videojs+dash while using source elements and https://github.com/videojs/videojs-contrib-dash (which sets the source programmatically just like in this example). I could find a workaround for this issue, but i'm afraid this would not limit only to my case. Also, i'm not sure whether it's appropriate to compare with HLS or not, but here it goes: |
Some of the logs in the comment above make it clearer what is happening - there are two player instances here, at least some of the time. It turns out that, when presented with a video.js creates a player programmatically, attaches the source and starts, which is how we expect it to work, and all is good - the MediaSource is attached, Subsequently, the load event triggers and the handler mentioned above runs and creates another player which sets the source tag on the media element, causing a second However, it isn't clear why this isn't happening in the original console log, or the first in the previous comment so more investigation may be required since there may be another issue here. |
As expected, the initial problem was indeed caused by the At least in Chrome on Win7, |
As a workaround for the third loadstart (all but the first in #1491 (comment)) could add:
immediately after this.mediaPlayer_ has been initialised. |
Looks like the intended way to disable auto-creation is to add the following to the HTML before dash.js is included:
Source: #1138 (comment) |
I have created #1496 to track the problem with three Can this issue be closed? |
Yep, all clear now, though a bit unfortunate that videojs+dash+source tags cannot exist together atm. Maybe something can be done in videojs to support multiple loadstart events, we'll see. |
Observed behaviour
Loadstart event is triggered twice on dash source initialization. It's currently incompatible with some of the latest videojs versions (videojs/video.js#3428)
Console output
The text was updated successfully, but these errors were encountered: