Top of pageSkip to main content

Live Streaming

Apps using the Zoom Video SDK can live stream a session to Facebook Live, YouTube Live, and custom live streaming platforms. To use this feature, the session host must enable live streaming service for meetings in their Zoom account.

In this section, 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 SDK.

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 wanted to livestream a session to YouTube, you must enable live streaming on your Google account.

To automate the following steps and get stream information programmatically, you may also want to utilize the YouTube Live Streaming API.

Step 1: Login to YouTube. Locate the video icon and press “Go Live”.

Go Live option on YouTube

Step 2: Click the Stream button in the top panel. Note: YouTube Webcam services are not compatible with Zoom SDK.

YouTube Stream button

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.

YouTube settings for Schedule for Later

Step 4: After creating the stream, the Steam URL and Stream Key will be available.

YouTube Stream URL and Key setup

Start live streaming the session

To start live streaming a session from your app, obtain an instance of IZoomVideoSDKLiveStreamHelper and verify that the current user can start streaming. Then call startLiveStream within IZoomVideoSDKLiveStreamHelper to begin live streaming.

// Get the IZoomVideoSDKLiveStreamHelper to perform livestream actions.
IZoomVideoSDKLiveStreamHelper* pLiveStreamHelper = m_pVideoSDK->getLiveStreamHelper();

// Check if live stream can start.
if (pLiveStreamHelper->canStartLiveStream() == ZoomVideoSDKErrors_Success) {

    // Call startLiveStream to begin live stream.
    int err = pLiveStreamHelper->startLiveStream(strStreamUrl, strKey, strBroadcastUrl);

    if (err == ZoomVideoSDKErrors_Success)
    {
            // Live stream successfully began.
    }
    else
    {
            // Live stream could not start.
    }
}

To stop the stream with the SDK, call stopLiveStream.

// Get the IZoomVideoSDKLiveStreamHelper to perform livestream actions.
IZoomVideoSDKLiveStreamHelper* pLiveStreamHelper = m_pVideoSDK->getLiveStreamHelper();

// Call stopLiveStream to stop the live stream.
pLiveStreamHelper->stopLiveStream();

After calling the startLiveStream function, you can listen for updates through your IZoomVideoSDKDelegate implementation's onLiveStreamStatusChanged callback.

NameDescription
ZoomVideoSDKLiveStreamStatus_NoneNo live stream is active.
ZoomVideoSDKLiveStreamStatus_InProgressLive streaming is in progress.
ZoomVideoSDKLiveStreamStatus_EndedLive streaming has ended.
ZoomVideoSDKLiveStreamStatus_ConnectingLive streaming is connecting.
ZoomVideoSDKLiveStreamStatus_FailedTimeoutLive stream failed due to timeout.
ZoomVideoSDKLiveStreamStatus_StartFailedLive stream could not start.

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.