Overview
The Presenter Mode feature allows developers to create a calling service experience in which:- There are one or more users who are presenting their video, audio and/or screen (Maximum 5)
- Viewers who are consumers of that presentation. (They cannot send their audio, video or screen streams out).
- The total number of presenters and viewers can go up to 100.
- Features such as mute/unmute audio, show/hide camera capture, recording, etc. will be enabled only for the Presenter in this mode.
- Other call participants will not get these features. Hence they act like passive viewers in the call.
- All hands calls
- Keynote speeches
- Webinars
- Talk shows
- Online classes
- and many more…
About this guide
This guide demonstrates how to start a presentation into an iOS application. Before you begin, we strongly recommend you read the calling setup guide. Before starting a call session you have to generate a call token using the below generateToken() method. 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
Start Presentation Session
The most important class that will be used in the implementation is the
PresentationSettings class. This class allows you to set the various parameters for the Presentation Mode. In order to set the various parameters of the PresentationSettings class, you need to use the PresentationSettingsBuilder class. Below are the various options available with the PresentationSettings class.
PresentationSettingsBuilder class takes the 1 mandatory parameter as a part of the constructor:
- Context of the application
Presenter & Participant , You can set this PresentationSettingsBuilder by using the following method isPresenter(true/false)
A basic example of how to start a Presentation:
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.
- PresentationSettings.
- Swift
Start Call
To start a call, user have to passcallToken and presenterSettings.
callToken In the success block of generateToken(), user get the callToken.
PresentationSettings presenterSettings can be set from the presentationSettingsBuilder
View This is going to be the view in which CometChatCalls can load the calling views
- Swift
Calling Events Listeners
To get calling events, User have to conform the “CallsEventsDelegate” delegate. For these events working, User have to pass “self” to setDelegate() in presentationSettingsBuilder.
- Swift