Webcam light stay on when during video call but my video is turn off in tokbox - tokbox

I am using Tokbox API for making video call application. But I have one problem show. During video call i show my laptop's webcam light stay ON but in call my video is turnoff. It seems like Tokbox API accessing my webcam behind the scene. How can I stop my laptop's webcam light when I turn off my video from call ?

Are you disabling video with OT.initPublisher({ publishVideo: false }) or publisher.publishVideo(false)? If so, then this is expected because we need to capture the camera in case you enable video later on in the call.
If you want to always have video disabled to have an audio only call, then please use OT.initPublisher({ videoSource: null }), this will not capture the camera at all.
See documentation for videoSource at https://tokbox.com/developer/sdks/js/reference/OT.html#initPublisher
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.

Related

how to detect that camera or mic is turned off on `onUserJoined` agora in react-native

In the agora, there are methods that detect when users turn off the audio (onRemoteAudioStateChanged) of video (onRemoteVideoStateChanged) streams while you are both on a call.
But when one user starts previewing and turns off the cam or mic and then joins a call is there any possibility to detect that on onUserJoined?

WebRTC picture capturing doesn't work on smartphones

I'm trying to get an image capture from the front or back camera of my smartphone using the WebRTC. I used one of WebRTC samples for that. This code works perfectly in browsers on the computer, but on the smartphone with different operating systems (iOS, Android) I get a black screen in the tag <video autoplay></video>. I tried various browsers, in none of them the image capture function worked properly, everywhere a black screen was displayed. What should I do to capture the picture?
I have a http connection, all my smartphones and cameras work fine, so the problem is definitely in WebRTC (or in its use).
For Safari, try adding playsinline to the video element. See this thread for background information.
If that doesn't help you might want to check the mediastream as well as the video elements readyState property.

Agora WebRTC Change video call view

I am working on a react-native project which uses Agora.io for video calling.
In a video call it shows my camera feed as fullscreen and the reciever's feed as thumbnail which is the opposite of the correct way.
I want to know, Is this the way agora works or is it possible to fix this..?
Because even in their website they have put the images in that way.
image on the home page
I appreciate any help regarding to fix this.
So it seems like you are presenting the local video stream to the larger view. You would need to switch this. Render the remote video stream on the larger view and the local video stream on the thumbnail view.

How to close peerConnection in WebRtc

WebRtc sample
If I press call, allow/deny menu is shown in the upper screen. When I press allow, Chrome starts displaying red circle in the header which signals that microphone is active. All other sounds in others Chromes tabs are muted (for example youtube video).
When I press hang, red circle does not dissapears, youtube video in second tab is still muted. I have to press F5 to restore state which was before call.
Is there any PeerConnection to stop the call and stop mic recording ?
Yes, the reason the "red light" is still on is that the media tracks in the mediaStream object (called localstream on that particular page) gathered through getusermedia is still playing/active.
To close a media stream and thus release any hold on the local media inputs simply call localstream.stop() that will end the stream and stop accessing the local media input. This will stop all associated media tracks.
You can also do this by calling stop() on the individual media tracks(grabbed from getVideoTracks or getAudioTracks from the mediaStream).
As for other audio being turned down in other pages/apps. Here is the crbug handling that issue.
Side Note: if the media is being pushed through a peerConnection, then you will probably have to renegotiate the connection due to the mediaStream changing.

Playing back a CMSampleBuffer

I'm trying to create an application that streams video and audio to an other computer.
On the "server" side, I'm able to capture (using AVCaptureSession) video and audio, to preview them and to send them over the network using the delegate and reconstruct everything back on the other side.
On "client" side I've then a CMSampleBuffer that contains audio and video and I don't find the way to play it back. I've checked AVPlayer and AVCaptureSession, but I don't understand the mechanism with a CMSampleBuffer for input.
Any ideas, links? Thank you!
you could try AVSampleBufferDisplayLayer.