Joining a meet
#
PrerequisitesMeet sdk should be initialised, group call feature has to be enabled for the current plan and a valid Meetlink should be available.
info
Calling CallManager.createMeetlink()
method will provide a unique meet id everytime.
For better user experience, users could be presented with a preview screen to observe the meet events, render local preview video, option to switch camera and mute the audio or video even before joining the call. We can make use of the below methods for preview screen UI implementations.
#
SetupWe must establish a connection to the meet server for further subscription, for that we need to call the below method before calling any other methods related to Meet.
caution
Make sure to clean up meet data by the calling this Unsubscribe
method before joining or to cancel a meet.
#
SubscribeSDK require the User to subscribe the link before joining the meetaSDK requires the User to subscribe the link before joining the meet.Successful subscription will let us know of the participants of the ongoing meet and provide realtime updates of newly joined and recently left participates too. Also let the developers restrict the participants to a meet based on the requirements.
Argument | Type | Description |
---|---|---|
CALL_ID | String | Generated call link id for an ongoing call. E.g. (ght-trt-wkk) |
USER_NAME | String | username of the current user |
(isSuccess,message) | (Bool,String)) | completion handler to post response |
if isSuccess
returns false, then you need to show error message to the user and close the UI.
caution
Make sure to ask for the Camera and Microphone access in th UI before joining/subscribing to a meet. Without Microphone permission SDK won't let users join a meet.
#
Observe To observe the subscription events triggered by sdk, we need to conform to the JoinCallDelegate
protocol provided by the SDK. To set the delegate call the method below.
Argument | Type | Description |
---|---|---|
JOIN_CALL_DELEGATE | JoinCallDelegate | UIViewController that conforms to the delegate |
The protocol contains the following delegate methods and will be triggered by the SDK based on the events received from the server accordingly.We can update the UI based on the data we received from these methods.
onLocalTrack
event will be fired once you called startVideoCapture()
from the sdk provided
all the required permissions were already granted.
onUsersUpdated
event will be fired whenever there is a change in users list for the call, you can use this
to update the users list in the UI. Users list is provided as an array of user's id.
onError
event will be fired whenever there is a error occurred while joining the meet.
#
UnsubscribeOnce Subscription was called, unsubscribing to the link was necessary to dispose the meet data to avoid memory leaks and unnecessary resource usage. We must call the below method to unsubscribe to a meet link.
#
JoinAfter successful subscription, we can call the below method to start joining in the ongoing meet.
#
EndIf you want to disconnect an ongoing meet at the end of conversation or when the user presses the end button of your meet UI , you need to call the below sdk method to disconnect the meet.