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

HLS video data keeps loading if player stopped/unmounted before start playing #817

Closed
SentretC opened this issue Feb 25, 2020 · 2 comments
Closed

Comments

@SentretC
Copy link

SentretC commented Feb 25, 2020

Current Behavior

If the player is asked to play an HLS video, then stopped/unmounted after the .m3u8 file is loaded but before the first .ts file is loaded, the browser keeps downloading the .ts files afterwards.

Expected Behavior

No video data should bu requested if the player is stopped/unmounted.

Steps to Reproduce

  1. Visit the official demo site: https://cookpete.com/react-player/
  2. Open the browser's inspector tool
  3. Click the HLS (m3u8) button, then click the Stop buton shortly afterwards
  4. Check the inspector to see the .ts files continue to get downloaded (or try again if the stop button is not clicked at the correct time)

Environment

  • URL attempting to play:
  • Browser: Firefox 73.0, Chrome 80.0
  • Operating system: Windows 10 1903
@scottyeung
Copy link

Did you try to override hlsOptions autoStartLoad?

@SentretC
Copy link
Author

Did you try to override hlsOptions autoStartLoad?

Thanks for the advice, but it prevents the video from playing (without further customization).

Then I tried calling getInternalPlayer('hls').destroy() manually, which seems to fix the issue.
I think ReactPlayer should be responsible to properly destroy what's underlying, but I'm not experienced enough to commit a PR for this, could someone please help?

albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Calls `destroy()` regardless of `isReady` or not
Fixes cookpete/react-player#817
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
Calls `destroy()` regardless of `isReady` or not
Fixes cookpete/react-player#817
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
Calls `destroy()` regardless of `isReady` or not
Fixes cookpete/react-player#817
philip-luther added a commit to philip-luther/react-player that referenced this issue Nov 22, 2024
Calls `destroy()` regardless of `isReady` or not
Fixes cookpete/react-player#817
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