-
Hi all, could somebody please help me determine the root cause of this behavior? I have gone through the wiki for any fix but have not been able to figure it out. How to replicate the issue?
After these steps, you will find that the webcam indicator is still active even though we have navigated to a different route. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
its a sandbox dev, it doesn't behave like a proper browser tab. when you navigate away from the page using browser location, camera turns off. even in sandbox, it turns off first time i click "home", but not second which means sandbox is trying to be "clever". its a sandbox thing, i don't see library doing anything wrong here. |
Beta Was this translation helpful? Give feedback.
-
The problem was caused by React 18's useEffect function triggering a double mount, which resulted in the getUserMedia function being called twice and creating separate streams. To fix this, I implemented a caching system for the streams and stopped them on each unmount. Feel free to check out the sandbox |
Beta Was this translation helpful? Give feedback.
-
i don't, sorry. haven't done much work with audio. |
Beta Was this translation helpful? Give feedback.
The problem was caused by React 18's useEffect function triggering a double mount, which resulted in the getUserMedia function being called twice and creating separate streams. To fix this, I implemented a caching system for the streams and stopped them on each unmount. Feel free to check out the sandbox