# Camera Light is not turn off while making publishVideo as false

**URL:** <https://openvidu.discourse.group/t/camera-light-is-not-turn-off-while-making-publishvideo-as-false/3032>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [May 8, 2021, 9:15am UTC](https://openvidu.discourse.group/t/camera-light-is-not-turn-off-while-making-publishvideo-as-false/3032 "2021-05-08T09:15:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajesh\_V](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/rajesh_v/32/1490_2.png) [@Rajesh\_V](https://openvidu.discourse.group/u/Rajesh_V)\
**Post date:** [May 8, 2021, 9:15am UTC](https://openvidu.discourse.group/t/camera-light-is-not-turn-off-while-making-publishvideo-as-false/3032/1 "2021-05-08T09:15:29Z")

</div>

Hi,

I need only Audio and 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;

```auto
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);

Has anyone used only Audio in OpenVidu?  
Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [May 10, 2021, 8:28am UTC](https://openvidu.discourse.group/t/camera-light-is-not-turn-off-while-making-publishvideo-as-false/3032/2 "2021-05-10T08:28:40Z")

</div>

Already answered here. [Camera does not turn off when publishVideo(false) is called - #16 by Rajesh\_V](https://openvidu.discourse.group/t/camera-does-not-turn-off-when-publishvideo-false-is-called/1296/16)

Please do not spam the forum with duplicated messages.

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [May 10, 2021, 8:28am UTC](https://openvidu.discourse.group/t/camera-light-is-not-turn-off-while-making-publishvideo-as-false/3032/3 "2021-05-10T08:28:53Z")

</div>


