Quick Reference - Start a presentation session:
Available via: SDK | UI Kits
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 React Native 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.Start Presentation Session
The most important class that will be used in the implementation is thePresentationSettings 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.
You will need to set the User Type, There are 2 type of users in Presenter Mode, Presenter & Participant , You can set this PresentationSettingsBuilder by using the following method setIsPresenter(true/false)
A basic example of how to start a Presentation:
- JavaScript
Listeners
Listeners can be added in two ways the first one is to use.setCallEventListener(listeners : OngoingCallListener) method in CallSettingsBuilder or PresenterSettingsBuilder class. The second way is to use CometChatCalls.addCallEventListener(name: string, callListener: OngoingCallListener) by this you can add multiple listeners and remove the specific listener by their name CometChatCalls.removeCallEventListener(name: string)
- JavaScript
onUserJoined Response
onUserJoined Response
On Event —
onUserJoined returns a user object when a participant joins the presentation:User Object:onUserLeft Response
onUserLeft Response
On Event —
onUserLeft returns a user object when a participant leaves the presentation:User Object:onUserListUpdated Response
onUserListUpdated Response
On Event —
onUserListUpdated returns an array of all current participants in the presentation:User Array:User Object (each item in array):
onAudioModesUpdated Response
onAudioModesUpdated Response
On Event —
onAudioModesUpdated returns an array of available audio output modes:Audio Modes Array:Audio Mode Object (each item in array):
onRecordingStarted Response
onRecordingStarted Response
On Event —
onRecordingStarted returns information about the user who started the recording:RecordingStartedBy Object:onRecordingStopped Response
onRecordingStopped Response
On Event —
onRecordingStopped returns information about the user who stopped the recording:RecordingStoppedBy Object:CometChatCallsEventsListener listener provides you with the below callback methods:
Settings
ThePresentationSettings class is the most important class when it comes to the implementation of the Calling feature. This is the class that allows you to customize the overall calling experience. The properties for the call/conference can be set using the PresentationSettingsBuilder class. This will eventually give you and object of the PresentationSettings class which you can pass to the joinPresentation() method to start the call.
The mandatory parameters that are required to be present for any call/conference to work are:
- Context - context of the activity/application
- RelativeLayout - A RelativeLayout object in which the calling UI is loaded.
In case you wish to achieve a completely customised UI for the Calling experience, you can do so by embedding default android buttons to the screen as per your requirement and then use the below methods to achieve different functionalities for the embedded buttons.
For the use case where you wish to align your own custom buttons and not use the default layout provided by CometChat you can embed the buttons in your layout and use the below methods to perform the corresponding operations:
Best Practices
Set user type correctly
Set user type correctly
Always explicitly set
setIsPresenter(true) for presenters and setIsPresenter(false) for viewers. Viewers cannot send audio, video, or screen streams — this is enforced by the SDK, not just the UI.Limit presenters to 5
Limit presenters to 5
Presenter Mode supports a maximum of 5 concurrent presenters. If your app allows dynamic role switching, enforce this limit in your logic before calling
setIsPresenter(true) for additional users.Clean up listeners on component unmount
Clean up listeners on component unmount
Always remove call event listeners in your component’s cleanup function (e.g., the return function of
useEffect). Orphaned listeners can cause memory leaks and duplicate event handling.Generate call tokens just before use
Generate call tokens just before use
Call tokens are session-specific and time-limited. Generate them right before starting the presentation session rather than caching them for extended periods.
Troubleshooting
Viewer can send audio/video
Viewer can send audio/video
Verify that
setIsPresenter(false) is set for viewer participants. If a viewer is incorrectly set as a presenter, they will have access to media controls.Presentation UI does not render
Presentation UI does not render
Ensure the
CometChatCalls.PresenterComponent is wrapped in a View with flex: 1 or explicit dimensions. Also confirm that both presenterSettings and callToken props are provided and not null.Listeners not firing
Listeners not firing
Check that the listener is registered before the presentation session starts. If using
addCallEventListener, ensure the listenerId is unique and hasn’t been overwritten. Also verify the Calls SDK has been initialized via CometChatCalls.init().Maximum participant limit reached
Maximum participant limit reached
Presenter Mode supports up to 100 total participants (presenters + viewers). If users can’t join, check the current participant count in your session.
Next Steps
Call Session
Start and manage standard call sessions with full configuration options
Recording
Record presentation sessions for playback and compliance
Video View Customisation
Customize the main video container and participant tiles
Calls SDK Setup
Install dependencies, configure permissions, and initialize the Calls SDK