Red5 Pro HTML5 SDK

The Red5 Pro HTML5 SDK allows you to integrate live streaming video into your desktop and mobile browser.


To begin working with the Red5 Pro HTML5 SDK in your project: download the latest release


In a browser:

<!doctype html>
    <!-- *Recommended WebRTC Shim -->
    <script src=""></script>
    <!-- video containers -->
    <!-- publisher -->
      <video id="red5pro-publisher" width="640" height="480" muted autoplay></video>
    <!-- subscriber -->
      <video id="red5pro-subscriber" width="640" height="480" controls autoplay></video>
    <!-- Red5 Pro SDK -->
    <script src="lib/red5pro/red5pro-sdk.min.js"></script>
    <!-- Create Pub/Sub -->
      (function(red5prosdk) {
        'use strict';

        var rtcPublisher = new red5prosdk.RTCPublisher();
        var rtcSubscriber = new red5prosdk.RTCSubscriber();
        var config = {
          protocol: 'ws',
          host: 'localhost',
          port: 5080,
          app: 'live',
          streamName: 'mystream',
          rtcConfiguration: {
            iceServers: [{urls: ''}],
            iceCandidatePoolSize: 2,
            bundlePolicy: 'max-bundle'
          } // See

        function subscribe () {
            .then(function () {
              return rtcSubscriber.subscribe();
            .then(function () {
            .catch(function (err) {
              console.log('Could not play: ' + err);

          .then(function () {
            // On broadcast started, subscribe.
            rtcPublisher.on(red5prosdk.PublisherEventTypes.PUBLISH_START, subscribe);
            return rtcPublisher.publish();
          .then(function () {
          .catch(function (err) {
            console.error('Could not publish: ' + err);



The Red5 Pro HTML SDK is intended to communicate with a Red5 Pro Server, which allows for broadcasting and consuming live streams utilizing WebRTC and various protocols, including RTMP and HLS.

As such, you will need a distribution of the Red5 Pro Server running locally or accessible from the web, such as Amazon Web Services.

Start using the Red5 Pro Server today!


This section describes using the Red5 Pro HTML SDK browser install to create sessions for a Publisher and a Subscriber.


Please refer to the Publisher Documentation for information about setting up a broadcast session.


Please refer to the Subscriber Documentation for information about setting up a subscriber session.

Shared Object

Please refer to the SharedObject Documentation for information about using SharedObjects in both Publishers and Subscriber.

Migration Guides

Please refer to the Migration Guides for help in migrating your code through minor and major releases.

API Documentation

For more in-depth documentation about the structure of the HTML5 Streaming SDK, please visit: Red5 Pro HTML5 Streaming Documentation