-
Notifications
You must be signed in to change notification settings - Fork 222
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
Animation is paused if source is not visible anywhere #307
Comments
This sounds like intended behaviour from the Page Visibility API. |
I would agree that this behaviour is intended in an actual browser (laptop battery life and all that) but not in a broadcast setting. |
The main reason we respect the Page Visibility API is because it's standardised behaviour, which in my opinion also makes sense in a broadcast setting. Keep in mind a large chunk of our users stream video games while using OBS, and wouldn't want sources using resources unnecessarily when they're not visible. |
I'm aware of that, and in fact I see the same issue happening often with video game streamers who have an intermission scene with their chat rendered on it: the chat doesn't update when the scene isn't visible and only restarts when they switch to that scene. Most game streamers don't use studio mode so I'm going to guess this is the same behaviour. Another problem with this is that it causes the behaviour of the browser source in OBS to be different depending on whether or not you're using studio mode, a multi-view window or a source/scene projector that happens to have the relevant browser source in it. It is my opinion that while this behaviour might be ok to have enabled by default for the reason you state, it should be able to be opted out of without workarounds. |
I wouldn't be against a toggle in the browser source Properties that allows the user to disable the Page Visibility API, it'd just have to be worded very specifically. |
Operating System Info
Windows 10
Other OS
No response
OBS Studio Version
27.0.1
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/gORv5KITsQ0cWIfn
OBS Studio Crash Log URL
No response
Expected Behavior
The OBS Browser source should always continue to run animations (and js code) even when it is not actually visible anywhere. For example an animation triggered by the scene being switched away from the browser source should continue in the background so that when the source becomes visible again, it is (presumably) finished.
Current Behavior
When not using studio mode, a multiview window or a projector, processing is paused when the browser source becomes invisible. Using studio mode or having a multi-view or a projector containing the source open prevents the behaviour and has animations complete as expected.
A quick google led me to the "--disable-background-timer-throttling" flag to prevent this but that does not work in the current version of OBS at the time of writing.
Steps to Reproduce
The page contains a red bar with text that moves up or down. Only the downward motion should be visible to Program.
Anything else we should know?
It seems that the obsSourceVisibleChanged event also does not fire when using studio mode/etc which I believe is not how people are intending that to be used. I have not verified this however.
The text was updated successfully, but these errors were encountered: