Skip to content
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

Old request continues to download #174

Closed
ronag opened this issue Feb 28, 2016 · 2 comments
Closed

Old request continues to download #174

ronag opened this issue Feb 28, 2016 · 2 comments

Comments

@ronag
Copy link

ronag commented Feb 28, 2016

I don't think old requests are properly cleaned up when changing sources, i.e. I can see in the Chrome Dev Tools that they continue downloading...

In _updateSource, instead of just doing:

// Remove the old media
_remove(plyr.media);

I think the following is required:

plyr.media.pause();
plyr.media.src = '';
plyr.media.load();
// Remove the old media
_remove(plyr.media);
@ronag
Copy link
Author

ronag commented Feb 28, 2016

Likewise in destroy

@sampotts
Copy link
Owner

Thanks for this. There was a pull request for this for the old source() method but I'd been meaning to port it to the new method.

I've fixed this for the source() api method but with destroy() the intention there is to return the player to it's "default" state, e.g. back to a native UI'd player. In my mind that would mean you wouldn't want to remove the sources there? I could make it an option of course though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants