FAQ
After leaving an Odin room, the microphone indicator in my tab does not disappear.
Issue
When you disconnect from an Odin room by calling room.disconnect(), all media objects stop sending and receiving data. However, you might notice that the microphone indicator remains visible in your browser tab. This can lead users to believe that the microphone is still active.
Solution
To ensure the browser recognizes that the microphone is no longer in use, additional clean-up steps are necessary. The following function shows how to stop all media tracks associated with the microphone and remove them from the media stream:
Execute this clean-up function on the media stream that is capturing audio to make sure that all resources are properly released and the microphone indicator is removed.