Live Streaming
Apps that have integrated with the Zoom Video can live stream a session to Facebook Live, YouTube Live, and a number of other custom live streaming platforms.
In this tutorial, we will show you how to set up a streaming event in a third-party platform (YouTube) and implement a feature to start and stop live streaming of a session using the Video.
Retrieve Live Streaming Credentials From Selected Platform
Live streaming with SDKs requires the following information from third-party streaming platforms: Stream URL, Stream Key, Broadcast URL.
For instance, if you want to livestream a session to YouTube, you must Enable Live Streaming on your Google account and retrieve the stream information.
Step 1: Login to YouTube. Locate the video icon and press “Go Live”.
Step 2: Click the Stream button in the top panel.
Important: YouTube Webcam services are not compatible with Zoom SDK.
Step 3: Fill out the required information and toggle “Schedule for later”. If this is not selected, the live stream will start immediately and will not provide setting info.
Step 4: After creating the stream, the Steam URL and Stream Key will be available.
To automate the above steps and get stream information programmatically, you may utilize the YouTube Live Streaming API.
Start Live Streaming the Session
To start live streaming a session from your app, first obtain an instance of ZoomVideoSDKLiveStreamHelper
and verify that the current user can start streaming.
ZoomVideoSDKLiveStreamHelper liveStreamHelper = ZoomVideoSDK.getInstance().getLiveStreamHelper();if (liveStreamHelper.canStartLiveStream() == ZoomVideoSDKErrors.Errors_Success) {// The user may start live streaming.}
val liveStreamHelper = ZoomVideoSDK.getInstance().liveStreamHelperif (liveStreamHelper.canStartLiveStream() == ZoomVideoSDKErrors.Errors_Success) {// The user may start live streaming.}
In order to start the stream using the SDK, you will need to provide the three pieces of information that were mentioned earlier: stream URL, broadcast URL, and key.
Once you have the three fields required for live streaming, you can start/stop a live stream through your helper.
// Start live streamingliveStreamHelper.startLiveStream(streamUrl, key, broadcastUrl);// Stop live streamingliveStreamHelper.stopLiveStream();
// Start live streamingliveStreamHelper.startLiveStream(streamUrl, key, broadcastUrl)// Stop live streamingliveStreamHelper.stopLiveStream()
After calling the startLiveStream method, you can listen for updates through your ZoomVideoSDKDelgate
implementation's onLiveStreamStatusChanged callback.
Name | Description |
---|---|
ZoomVideoSDKLiveStreamStatus_None | No live stream is active. |
ZoomVideoSDKLiveStreamStatus_InProgress | Live streaming is in progress. |
ZoomVideoSDKLiveStreamStatus_Connecting | Attempting to connect to the live streaming service. |
ZoomVideoSDKLiveStreamStatus_StartFailed | Failed to connect to the live streaming service. |
ZoomVideoSDKLiveStreamStatus_FailedTimeout | The connection to the live streaming service has timed out. |
ZoomVideoSDKLiveStreamStatus_Ended | Live streaming has ended. |
Need help?
If you're looking for help, try Developer Support or our Developer Forum. Priority support is also available with Premier Developer Support plans.