-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
clear out currentSource on loadstart #2957
Conversation
@@ -477,6 +477,11 @@ class Html5 extends Tech { | |||
* @method setSrc | |||
*/ | |||
setSrc(src) { | |||
let loadstartlistener = () => this.currentSource_ = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main question: should we dispose the current source handler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, loadstartlintener
should probably be moved to a private prototype method so that removing it works correctly on subsequent calls to setSrc.
Opening it up now for discussion. This should get tests but I'll wait off till we decide the specific functionality. |
(Also, the direct issue that sprouted this has been worked around for now, so, it's not a huge hurry) |
I haven't been following, but is this |
@chemoish sort of, actually. The Source Handler interface in videojs (what videojs-contrib-hls uses) gives the source ( |
Ah, I see. No, it doesn't necessarily make it obsolete. #2833 made it so that |
Starting with v5.2.2 we've been returning the cached src for source handlers. This is important for techs that end up using MSE so that we return an the original source rather than the blob url that gets set.
However, there are cases when, in the html5 tech, the underlying video element could get a new video set, bypassing the videojs API. We want to actually pick up this change to return the new sources.