Learn how to add video conference calls to your app.
quickblox-multiparty-video-conferencing-client-0.8.6.min.js
.
config
object:
Field | Required | Description |
---|---|---|
server | yes | A conference server endpoint or array of endpoints. |
debug | no | Enables logging. true is enabled. false is disabled. |
iceServers | no | A list of ICE servers. |
userId
to null
and isRemote
to false
.Event | Description |
---|---|
plugin.events.CONSENT_DIALOG | This event is triggered just before the getUserMedia() method is called and after it is completed. This means it can be used to modify the UI accordingly. For example, to prompt the user to accept the device access requests. |
plugin.events.MEDIA_STATE | This event is triggered when the media server starts or stops receiving your media. For example, a mediaState with type=audio and on=true means that the media server started receiving your audio stream or started getting it again after a pause of more than a second. A mediaState with type=video and on=false means that the media server hasn’t received any video from you in the last second after a start. This event is useful to figure out when the media server actually started handling your media, or to detect problems on the media path (for example,, media never started, or stopped at some point of time time). |
plugin.events.WEBRTC_STATE | This event is triggered with a true value when the PeerConnection associated with a handle becomes active (so ICE, DTLS and everything else succeeded) from the media server perspective. A false value is triggered when the PeerConnection goes down instead. This event is useful to figure out when WebRTC is actually up and running between you and the media server. In case of the false value, a reason of the String type may be present as an optional parameter. |
plugin.events.SLOW_LINK | This event is triggered when the media server reports trouble associated with either sending or receiving media on the specified PeerConnection. Typically, it is triggered as a consequence of too many NACKs received from/sent to the user in the last second. For example, a slowLink with uplink=true means you notified several missing packets from the media server, while uplink=false means the media server is not receiving all your packets. This event is useful to figure out when there are problems on the media path (for example,, excessive loss), in order to react accordingly (for example,, decrease the bitrate if most of our packets are getting lost). |
plugin.events.ICE_STATE | This event is triggered when the ICE state for the PeerConnection associated with the handle changes. Thus, the argument of the callback is a new state of the String type (for example,, “connected” or “failed”). |
plugin.events.DETACHED | The plugin handle has been detached by the plugin itself, and so should not be used anymore. |
plugin.events.CLEANUP | The WebRTC peer connection with the plugin was closed. |
join()
method.
joinParams
object:
Field | Required | Description |
---|---|---|
roomId | yes | A room ID, should be of String type. |
userId | yes | A user ID, should be of Number type. |
display | no | A name to be shown to other participants, should be of String type. |
onlyAudio | no | Specifies whether to use the audio only. A Boolean parameter. Default: false . |
role | no | A user role. Possible values are subscriber or publisher . Default: publisher . |
video | no | A video property. Default: lowres . See this section for more information. |
QBVideoConferencingClient
.
QBVideoConferencingClient
has the following properties:
Property | Description |
---|---|
connected | Returns a boolean indicating whether the client is connected to the server or not. |
pluginId | Returns a unique plugin ID for the current user. |
sessionId | Returns a current session ID indicating if there is a session. |
currentRoomId | Returns a current room ID. |
listOnlineParticipants()
method.
events
to check the list of supported events. To assign an event handler, you can use the same API as for NodeJS EventEmitter.
Event | Description |
---|---|
client.events.PARTICIPANT_JOINED | A participant has joined a conference room. |
client.events.PARTICIPANT_LEFT | A participant has left a conference room. |
client.events.LOCAL_STREAM | A local MediaStream is available and ready to be displayed. |
client.events.REMOTE_STREAM | A remote MediaStream is available and ready to be displayed. |
client.events.SESSION_DESTROYED | A conference session has been destroyed. |
innerText
of the video element every second with the bitrate in ‘kbps’ for the remote user (if found by userId
). Thus, the following string will be shown in the video element: 180 kbits/sec.
innerText
of the video element and stop updating the bitrate.
listVideoInputDevices()
method. See this section to learn how to list video input devices. Then, call the switchVideoInput()
.
listAudioInputDevices()
method. See this section to learn how to list audio input devices. Then, call the switchAudioInput()
.
toggleScreenSharing()
method.
screenSharingEnabled()
method.
leave()
method.
detachVideoConferencingPlugin()
method detaches the plugin and destroys the handle tearing down to the related peer connection if it exists.
destroySession()
method.
video
property of the joinParams
object.
video
property are the following:
Property | Description |
---|---|
video | A video property. Default: lowres. The possible values are:For a small resolutionlowres (240 × 320)lowres-16:9 (180 × 320)For a normal resolutionstdres (480 × 640)stdres-16:9 (360 × 640)For a High(HD) resolutionhires, hires-16:9, hdres (720 × 1280). High(HD) resolution is only 16:9.For a full HD resolutionfhdres (1080 × 1920). Full HD resolution is only 16:9.For a 4K resolution4kres (2160 × 3840). 4K resolution is only 16:9. |