Joining a meet
Meet feature is essential for the modern day communication. Meet sdk allows users to make a audio/video meet with the another sdk users.
Subscribe#
caution
If Group calls feature is unavailable for your plan, then it will throw 403 exception
SDK require the User to subscribe the link before joining the meet. Use the subscribeCall method to subscribe the meet link.
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
MEET_LINK | Meet link | String | true |
USERNAME | Display Name of the current user | String | false |
CALLBACK | Callback method to handle success/error | Function | true |
Success/Error Object#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
Preview Screen Options#
Users can be provided with a preview screen in the UI to observe the meet events like rendering the preview video, updating the users in meet and mute the audio or video even before joining the meet.
User Track Listener#
You will receive your video/audio track in the userTrackListener callback.
Sample Response:#
Response Property Details:#
| Property | Description |
|---|---|
| localUser | Identify whether the track is belongs to local or remote user true - Local user false - Remote user. |
| track | Track object |
| trackType | Contain audio or video to identify type of track. |
| userJid | From user JID |
| usersStatus | Array of users with details. |
Sample Javascript code to play the track#
You need to supply the track object which was received in the callback method to the audio/video element based on the track type that you have received.
warning
You shouldn't play your own Audio track.
Users Update Listener#
After subscribe success callback, callUsersUpdateListener will be triggered that will hold the list of users on the meet. You can use this event to show the users list in the preview screen. This event callUsersUpdateListener will be triggered whenever there is a change in users list. So you can add/remove users from the preview UI. If callUsersUpdateListener triggered with empty users list, then there are no users in the meet.
Sample Response:#
Response Property Details:#
| Property | Description |
|---|---|
| userJid | User JID of current user |
| localUser | User JID is current logged in user or another user |
| usersList | List of users on the meet |
Unsubscribe#
When you are in the preview screen and decided to close the UI without joining the meet, you need to clear/unsubscribe the meet data by using the unsubscribeCall method.
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success Message | String |
Join#
To join a meet use the joinCall method.
Request Params#
| Param | Description | Type | Required |
|---|---|---|---|
CALLBACK | Callback method to handle success/error | Function | true |
Success/Error Object#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |
End#
After joining to the meet, if you need to end the ongoing meet you can use the endCall method.
Response Format#
Response Params#
| Arguments | Description | Type |
|---|---|---|
| statusCode | Status Code | Number |
| message | Success/Error Message | String |