virtual-background
virtual-background copied to clipboard
Virtual background not running in background
your sample is working fine when the browser tab is active, but when I move to another tabs this causes the requestanimationframe to stop. Can I know any workaround for this issue, to make it active, even when moving to another tabs. I have tried using setTimeout instead of request animation frame, video is rendering, but virtual background stops
A workaround is discussed in this issue, maybe could you give it a try.
As a workaround, you could try to play an almost inaudible sound with Web Audio API.
There is also this link to Chrome documentation explaining the throttling behavior, indeed setTimeout don't fixes the issue: https://developers.google.com/web/updates/2017/03/background_tabs#background_timer_alignment.