Generate Token
Generate token method takes two parameterauthToken and sessionId.
authToken: User can get the auth token from CometChatSDK that has a static method getUsersAuthToken().
sessionId: Any random string.
- Swift
Settings
The
CallSettings class is the most important class when it comes to the implementation of the Calling feature. This is the class that allows user to customize the overall calling experience. The properties for the call/conference can be set using the CallSettingsBuilder class. This will eventually give user an object of the CallSettings class which user can pass to the startCall() method to start the call.
The mandatory parameters that are required to be present for any call/conference to work are:
- UIView i.e a view in which user want to show the calling view inside it.
- Video Settings.
- Swift
Start Call
To start a call, user have to passcallToken, callSettings and callView.
callToken In the success block of generateToken(), user get the callToken.
callSettings CallSettings can be set from the CallSettingsBuilder
callView callView is a UIView in which you want to display the call UI
- Swift
Calling Events Listners
To get calling events, User have to conform the “CallsEventsDelegate” delegate. For these events working, User have to pass “self” to setDelegate() in callSettingsBuilder.
- Swift
MultiListener For Call Events
Through Multi Listener you can get Inn-call events in any class that acceptsCallsEventsDelegate
Add listener for a calls
- Swift
- Swift
CometChatCalls.endSession()
- Swift
- Objective C
Switch Camera
User can end the call by using theCometChatCalls.switchCamera()
- Swift
- Objective C
Audio Muted
User can end the call by using theaudioMuted(true)
- Swift
- Objective C
audioMuted(false)
- Swift
- Objective C
videoPaused(true)
- Swift
- Objective C
Unpause Video
User can end the call by using thevideoPaused(false)
- Swift
- Objective C
**setAudioMode(mode: "**_**MODE**_**")**
- Swift
- Objective C
Enter PIP Mode
User can end the call by using the**enterPIPMode()**
- Swift
- Objective C
**exitPIPMode()**
- Swift
- Objective C
**switchToVideoCall()**
- Swift
- Objective C
**startRecording()**
- Swift
- Objective C
**stopRecording()**
- Swift
- Objective C