I'm testing the sample code you gave but when I leave call and close trackers my camera light still on and brwosers show the icon in tab that says the website is using microphone or camera.
I've also tried first stopping them and then closing each one but it doesn't work.
React 18 - node 16.15.1
const leaveChannel = async () => {
await client.leave();
client.removeAllListeners();
// we close the tracks to perform cleanup
await tracks[0].stop();
await tracks[0].close();
await tracks[1].stop();
await tracks[1].close();
// the camera light should go off
setStart(false);
setInCall(false);
// you can now unmount the component if required
};
I'm testing the sample code you gave but when I leave call and close trackers my camera light still on and brwosers show the icon in tab that says the website is using microphone or camera.
I've also tried first stopping them and then closing each one but it doesn't work.
React 18 - node 16.15.1