Deprecated: This extension is no longer maintained and will not receive further updates.
Before you begin
- Sign up with api.video
- Get your API Key. Make sure you set up a payment method with them in order to get the Production API key. The Sandbox API Key will not work.
- Broadcaster needs to download and install OBS, a free and open-source software.
Extension settings
- Login to CometChat and select your app.
- Go to the Extensions section and enable the Live Streaming (Video Broadcasting) extension.
- Open the Settings for this extension.
- Enter the api.video Production API Key.
- You can also select whether you want to record the live stream.
How does it work?
This extension delivers 2 different configurations:- The broadcaster gets the
serveraddress andstreamKey. - The viewers get the
embed linkalong with a few more details.
Broadcaster
1. Get broadcast details
The CometChat SDKs provide acallExtension method that can be called to trigger this extension. The broadcaster has to provide the following:
- Receiver type -
userorgroup - The
receiverof the broadcast link (can be auidfor a user orguidin case of a group)
- JavaScript
- Java
- Swift
- JSON
2. Start Streaming
In order to start streaming/broadcasting, launch OBS studio and go to: Settings > Stream > SelectCustom from drop-down and enter the server and streamKey.
Once the details have been entered, click OK and close the Settings Panel. Next, you can click on the “Start Streaming” button.
Viewers
The viewers can either be a Group or a User. The recipient(s) will receive a text message withembed link and metadata as follows:
- Text message
- JSON
Implementation
At the viewers’ end, from the message object, you can fetch the metadata by calling the getMetadata() method. Using this metadata, you can fetch the broadcast details.- JavaScript
- Java
- Kotlin
- Swift