Camera / Mic Indicator is on when the camera was initialising user routed to different page.
See original GitHub issueI am using the below code to show the preview video before joining the call, but when the camera was initialising if the user navigates to a different page then the LED light indicator keeps on running on different route also. It should get closed as soon as the user leaves the page.
Previe Video Code
import {
ConsoleLogger,
DefaultDeviceController,
LogLevel,
} from "amazon-chime-sdk-js";
const logger = new ConsoleLogger("sdk", LogLevel.INFO);
const deviceController = new DefaultDeviceController(logger, {
enableWebAudio: true,
});
const previewVideo = async () => {
const audioList = await deviceController.listAudioInputDevices();
const deviceList = await deviceController.listVideoInputDevices();
await deviceController.chooseVideoInputDevice(deviceList[0]?.deviceId);
deviceController.startVideoPreviewForVideoInput(videoElement.current);
};
Render:
<video ref={videoElement}></video>
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Windows camera, microphone, and privacy - Microsoft Support
In Windows, having a camera and microphone as part of your device lets you make Teams video calls, take pictures, record videos, and...
Read more >Privacy Indicators | Android Open Source Project
When users click the microphone or camera indicators, they see which apps have accessed their data. This feature is mandatory for all OEMs....
Read more >Use your camera & microphone - Google Chrome Help
You can use your camera and microphone for sites in Chrome. ... If you're using a different Chrome tab or a different app,...
Read more >How to Test Webcam and Microphone Settings In ... - ON24
Simple: troubleshoot. Follow our instructions below to test, adjust and fix your microphone and camera settings for any ON24 Webcast Elite event ...
Read more >How To Enable Webcam/Microphone In Your Cloud Desktop
1. Plug in your webcam and make sure that it is working successfully on the Local desktop. · 2. Locate your RDP file....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting the issue. Yes, if JS SDK has already called
getUserMedia
as part ofawait deviceController.chooseVideoInputDevice(deviceList[0]?.deviceId);
then the LED will go ON and any re-direction would not stop it automatically.To turn the LED off, you have to follow this FAQ.
You also have to check for user re-direction though. You can use PageVisibility API to this and do the following:
Please let me know if this works for you or you have more questions.
Closing it for now, feel free to reopen it if you still have problems.