-
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
dispose() does not stop video from downloading on Firefox #1297
Comments
Want to throw together a pull request for this? |
Not really sure how, also Firefox shows this warning in the console "Invalid URI. Load of media resource failed." so setting src to blank might not be the best way to do it? Any ideas? |
Ok so just looked through the current behavior with @heff, and it looks like the best thing to do here is call |
@sethborg ping. Any interest in putting together a PR for this? |
Not quite sure what to put where. Is this correct? vjs.Component.prototype.dispose = function(){
this.trigger('dispose');
if (this.techName === 'Html5' && this.tag) {
vjs.Html5.disposeMediaElement(this.tag);
}
} Also I noticed calling Edits by @mmcc - Code blocks for readability |
That looks good. I would consider putting it between these two lines (115 and 117 in master): this.off('dispose');
// Kill reference to this player What's the context around the empty |
OK I updated component.js (pull request) btw it is this.off() not this.off('dispose') just curious where you got that from. As for the videojs('bumpboxVideo').src(''); I was using that as my temporary fix to stop firefox from downloading the movie in the background but doing that causes IE8 to throw an error. Not sure if you care to put any logic in there to prevent playing a movie if the video url is empty or not. |
Just to have the reference, the associated PR: #1334 |
Dispose removes the player but in Firefox (open firebug to the "Net" tab) the movie still loads in the background.
Calling dispose stops the video from downloading any further in chrome but not in Firefox. To do that you need to set the source to blank. Please add this to the dispose function.
The text was updated successfully, but these errors were encountered: