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

SoundCloud player doesn't get destroyed if you're quick like a QA engineer #6

Closed
Fauntleroy opened this issue Oct 20, 2015 · 3 comments

Comments

@Fauntleroy
Copy link
Contributor

If you switch to another media URL before the SoundCloud SDK loads an initializes, the SoundCloud player will stay alive... forever. I imagine this is because this.stop() does nothing when this.player doesn't exist yet.

To replicate:

  • npm run start
  • Go to http://localhost:3000/
  • Very quickly click "Soundcloud song" then "Vimeo video"
  • The Soundcloud song will continue playing while the Vimeo video plays

This should never happen in the wild, so I don't think it's a high priority at this time.

@cookpete
Copy link
Owner

Good spot. Should be easy enough to fix, we could either:

  • Around here just check this.isMounted() and bail if not.
  • Assign any data requests to local properties and abort them on componentWillUnmount

@cookpete
Copy link
Owner

Will probably have to use this.isMounted(), as it looks like load-script (used to load the SDK) doesn't have an abort function.

@cookpete
Copy link
Owner

Actually this.isMounted() wasn't enough. I've added a fix that checks the url we originally intended to load against the current props.url after the various requests are done, and aborts streaming if they differ.

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
@mgw-sbex mgw-sbex mentioned this issue Jan 25, 2019
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
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