Mute audio
Mute the audio by calling themute()
method. Using this method, we can tell SDK to send/not send audio data either from a local or remote peer. Unmute the audio by calling the unmute()
method.
JavaScript
Disable video
Disable the video by calling themute()
method. Using this method, we can tell SDK to send/not send video data either from a local or remote peer. Enable the video by calling the unmute()
method.
JavaScript
Switch camera
You can switch the video camera during a call by calling thegetMediaDevices()
method.
JavaScript
deviceId
and switch the video stream to the exact device.
JavaScript
Screen sharing
Use the screen sharing functionality to allow your users to share their screen. To enable screen sharing, you need to have an active call session that becomes active after thecall()
method is called, and the onCallListener()
callback is received by the remote user. Learn more details from the Initate call section.
As soon as you have a running call session use methods below:
- Use the
runScreenSharing()
to enable the screen sharing. As a result, the camera video track in the local stream will be switched to the screen-sharing video track. - Use the
stopScreenSharing()
to interrupt the screen sharing. As a result, the screen-sharing video track will be switched to the camera video track in the local stream.
JavaScript
Mirror local video
A mirror functionality allows to flip the video horizontally. Enable the mirroring when getting access to the local media steam using thegetUserMedia()
method. Set the mirror
as to true
to enable mirroring.
JavaScript
WebRTC stats reporting
You are able to receive the information report about the current connection, audio, video tracks, and other useful information. To set a receiving time interval, use the code snippet below. Review our Setup guide to learn more aboutCONFIG
configuration.
JavaScript
onCallStatsReport
callback to listen to the stats report.
JavaScript
General settings
You can change different settings for your calls usingCONFIG
object. Review our Setup guide to learn more about CONFIG
configuration.
Custom ICE servers
You can customize a list of ICE servers. By default, WebRTC module will use internal ICE servers that are usually enough, but you can always set your own. WebRTC engine will choose the TURN relay with the lowest round-trip time. Thus, setting multiple TURN servers allows your application to scale-up in terms of bandwidth and number of users. Review our Setup guide.Video calling settings
Set video calling settings using thewebrtc
fields.
JavaScript
Parameters | Description |
---|---|
answerTimeInterval | Maximum answer timefor the QB.webrtc.onUserNotAnswerListener callback to be fired. The answer time interval shows how much time an opponent has to answer your call. |
autoReject | If there is at least one active (recurring) call session and the autoReject is true, the call gets rejected. |
incomingLimit | If the number of active (recurring) call sessionsis more than it is defined by incomingLimit, the call gets rejected. |
dialingTimeInterval | The interval between call requests produced by the session.call() method. Dialing time interval indicates how often to notify your opponents about your call. |
disconnectTimeInterval | If an opponent has lost the connection then, after this time, the caller will know about it via the QB.webrtc.onSessionConnectionStateChangedListener callback. |
statsReportTimeInterval | Allows access to the statistical information about peer connection state (connected, failed, disconnected, etc). Set the number of seconds for the statistical information to be received. |
Media settings
Learn how to configure media settings following the sections below.Bitrate
A bitrate is a video stream encoding parameter. Set the bitrate and pass it within thecreateNewSession()
method. Default: 0.
JavaScript
If the parameter is set to more than
0
, the quality of the video is degraded.Camera resolution
A camera resolution is a video stream encoding parameter. It’s possible to set custom video resolution usinggetUserMedia
constraints. See getUserMedia for more examples.
JavaScript