Reputation: 450
I am using Opentok in a JS website and I am seeing the webcam led turn on even I have set off the video conference. When I make the call I am not able to see the other user but this turn on led is really annoying.
This is what I am doing for using voice only:
var pubOptions = {publishAudio:true, publishVideo:false};
// Initialize a Publisher, and place it into the element with id="publisher"
var publisher = TB.initPublisher(apiKey, 'publisher',pubOptions);
Am I missing something in order to make a proper voice only call?
Thanks
Upvotes: 1
Views: 917
Reputation: 3614
If you don't want video at all during the call then you will want to use the videoSource
property instead of the publishVideo
property.
publishVideo
is just for the initial state of the publisher, but it still requests access to the camera in case you later call publisher.publishVideo(true)
.
If you set videoSource
to null then it does not request access to the camera.
var pubOptions = {videoSource: null};
If you set this property to null or false, the browser does not request access to the camera, and no video is published. In a voice-only call, set this property to null or false for each Publisher.
From: https://tokbox.com/developer/sdks/js/reference/OT.html#initPublisher
Upvotes: 1