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

No autoplay next video, when tab doesn't have focus. #1679

Open
tkaryadis opened this issue Sep 21, 2023 · 3 comments
Open

No autoplay next video, when tab doesn't have focus. #1679

tkaryadis opened this issue Sep 21, 2023 · 3 comments

Comments

@tkaryadis
Copy link

tkaryadis commented Sep 21, 2023

I want to make a playlist, when one song ends to auto-play the next.
I use youtube links.

I use "onEnd", i change the state that "url" reads, i use simple string a signle URL.
If tab has the focus its working fine.
If tab doesn't has the focus, video plays until the end, but doesn't start the next.

This is happening in chrome/brave/chromium, on firefox it works even if tab doesn't have the focus.
I use ubuntu and Chromium Version 117.0.5938.88 (Official Build) snap (64-bit)

@tkaryadis tkaryadis changed the title No autoplay next song, when tab doesn't have focus. No autoplay next video, when tab doesn't have focus. Sep 21, 2023
@CoHarsh
Copy link

CoHarsh commented Sep 24, 2023

Can you please share the video bug report for this?

@tkaryadis
Copy link
Author

Can you please share the video bug report for this?

I am sorry but i don't know what you need the bug is not related with specific video i use youtube player, i use a simple string as url (not an array), and try to make a playlist, where i detect when video ends to play the next(change the url to another string), works only if tab has the focus.

If i make the url an array of strings(array of urls) playback is working even if tab doesn't have focus, but then i have other problems, like onEnd works only if all urls end(all playlist), everytime that the playlist changes i have to update the url of the player etc. Maybe the problem is not related with react-player, and its just default browser behaviour for perfomance/memory.

In any case because i am new to react-player, if someone can help on how i can play a playlist that dynamically changes and continues to play/move to next, when tab is not focused it will help me.

@walteraandrade
Copy link

Could you create an app with codesandbox or something to make it easy for us to replicate the error?

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

3 participants