-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Audio not stoping in the player #2005
Comments
I can confirm the bug. Thanks for filing and hope to find a fix it! |
I can take this bug 🥳 I think we can even make the whole player pause when we change tabs wyt ? |
Would be very happy if you investigated this @CruuzAzul! Seems like Chrome is pausing |
We should be able to do something in the I'll take a look at this 😉 |
Just to clear up any confusion: The bug is not about pausing the whole video! The bug is that when the website is visited, the video starts playing, and when you tab to another site, then the audio keeps playing, even when the Remotion video finishes! So to pause the whole video would only be a workaround if there is no better way to ensure the audio finishes if the audio finishes. |
Oh ok i see, i hadn't understood the problem like that, indeed thanks for the clarification ! 😅 I'll look into it 😊 |
Thanks for making this awesome package |
@JonnyBurger another behavior its not updating the audio also |
Is this related to the same thing ? |
mostly audio is not getting replaced |
@CruuzAzul you reproduce here https://remotion-poc.vercel.app/ |
@santoshgistto yes thanks ! I wanted to know if this problem was related to the first problem that appears when changing tabs in the browser 🤔 |
@JonnyBurger for the first issue by searching on the documentation it seems that is a feature of setAnimationFrame at work... Most of the solutions people propose to avoid the kind of problem we have seem to be to use the
|
@CruuzAzul / @JonnyBurger Here is sample repo https://github.com/santoshgistto/remotion-poc |
i believe its related to each other |
Those are two different bugs. The second one I moved to #2033 |
Thanks @JonnyBurger |
@CruuzAzul The visibilitychange thing seems also like it is the way to go. Do we switch to setTimeout()? Do we calculate when to stop the audio? |
@JonnyBurger I don't know... can we really have cases where we want the video to keep running in the background when we change tabs ? Maybe it makes sense to stop the video on the player when you switch tabs rather than calculating the time left on the audio and stopping it manually 🤔 |
@CruuzAzul I do think it makes sense to keep the audio running in the background yes! I am going to make a PR myself if you don't mind where I will test to use setTimeout() instead of requestAnimationFrame in the background and see if that fixes it! |
Looks like audio not stopping when we go to another tab in the browser
Steps:
The text was updated successfully, but these errors were encountered: