Real-time streaming

The Real-Time Streaming (RTS) plugin adds the ability to consume Wowza Video Real-Time Streaming at Scale (RTS@S) streams, Wowza Video WebRTC streams, and Wowza Streaming Engine WebRTC streams.

Installation

Include the rts plugin next to the core player:

<script src="//cdn.flowplayer.com/releases/native/3/stable/flowplayer.min.js"></script>
<script src="//cdn.flowplayer.com/releases/native/3/stable/plugins/rts.min.js"></script>

Configuration

The RTS plugin is a Loader plugin which means it will add a special handler for the source types it handles. Configuration depends on your stream type. See the configuration examples in the following sections.

Wowza Video™ Real-Time Streaming at Scale

If you configure a src with type: "wowza/rts", the RTS plugin connects to Wowza's RTS@S backend and consumes the stream that you configure it to show.

In addition to type, you also need to configure streamName. You will use the Stream Name that you entered when you created the real-time stream in Wowza Video, either through the API or in the UI.

The subscriberToken is an optional parameter. If you set a Playback Token by enabling stream security in the RTS@S Wowza Video configuration, you would add it as the subscriberToken.

Example

flowplayer("#player", {
  src: {
    type: "wowza/rts",
    streamName: "<streamName>",
    subscriberToken: "<your playback token>"
   },
  token: "<your player token>"
})

Wowza Streaming Engine WebRTC

You can use WebRTC with Wowza Streaming Engine through the UI. If you configure an src with type: "wowza/webrtc", the RTS plugin will connect to the Wowza Streaming Engine instance of your choice. You need to tell the player where your WSE instance is hosted and which stream to choose.

You can do that by configuring the following properties:

  • sdpUrl: wss://<your streamlock domain>.streamlock.net/webrtc-session.json
  • applicationName
  • streamName

The Signaling URL (SDP URL) in WSE contains your streamlock domain. The streamlock domain can be found as part of your ssl certificate name. The Application Name is the name of the application you set up in Wowza Streaming Engine for WebRTC streams. The Stream Name can be found in the Incoming Streams subsection under the application you created for the stream.

Example

flowplayer("#player", {
  src: {
    type: "wowza/webrtc",
    sdpUrl: "wss://zeezzrezrezr.streamlock.net/webrtc-session.json",
    applicationName: "webrtc",
    streamName: "myStream"
   },
  token: "<your player token>" 
})

Wowza RTS@Scale events

Please refer to the RTS events documentation for API event details.

Results