Can't able to close camera
Categories
(Core :: WebRTC: Audio/Video, defect)
Tracking
()
People
(Reporter: mozilkhan391, Unassigned)
Details
Attachments
(1 file)
|
4.45 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
Steps to reproduce:
Run following code only it's cannot close the camera firefox
const closeCamera = () => {
try {
if (stream) {
const tracks = stream.getTracks();
tracks.forEach((track) => track.stop());
}
setPermission(false);
clearRecordingTime();
} catch (error) {
console.error('Error closing camera:', error);
}
};
Actual results:
Camera is still using by Firefox.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Audio/Video' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
You can see this work on a basic test page like https://mozilla.github.io/webrtc-landing/gum_test.html -- click "Camera" and approve the prompt, then click "Stop".
Next time, please attach a reduced reproducible test case so there is something to debug.
The code you included contain some proprietary functions whose definitions you didn't include, so I cannot run it. The console would tell you this through the logged error though.
Description
•