Hello,
Do we have any update on this. I am also facing a similar problem but unable to solve this.
I don’t want to turn on the Video, while creating the publisher. Below is the Property I am passing in OV.initPublisher method
{“frameRate”:30,“insertMode”:“APPEND”,“mirror”:false,“publishAudio”:true,“publishVideo”:false,“resolution”:“640x480”}
By Specifying publishVideo as false, the webcam is not sending the feed, I can see black image in the Video, but still the camera light gets turned on, I am unable to turn it off.
Note: This Issue is appearing only in chrome, whereas in firefox the camera light gets turned off.
I tried using below code to stop the Video Track. But if we stop the VideoTrack, it inturn affects the Audio and the subscriber is unable to hear the Audio.
setTimeout(() => {
let videoTrack;
try {
if (publisher&& publisher.stream && publisher.stream.mediaStream
&& publisher.stream.mediaStream.getVideoTracks()) {
videoTrack = publisher.stream.mediaStream.getVideoTracks()[0];
}
} catch(error) {
console.log(error);
}
try {
if (videoTrack) {
videoTrack.stop();
}
}catch(error) {
console.log(error);
}
}, 3000);
Any help would be appreciated