An object representing an OpenTok live streaming broadcast.
Do not call the new()
constructor. To start a live streaming broadcast, call the
OpenTok.startBroadcast() method.
Properties:
Name | Type | Description |
---|---|---|
id |
String | The broadcast ID. |
sessionId |
String | The session ID of the OpenTok session associated with this broadcast. |
projectId |
String | The API key associated with the broadcast. |
createdAt |
Number | The time at which the broadcast was created, in milliseconds since the UNIX epoch. |
resolution |
String | The resolution of the broadcast: one of the following:
|
broadcastUrls |
Object | An object containing details about the HLS and RTMP broadcasts.
|
maxDuration |
Number | The maximum time allowed for the broadcast, in seconds. After this time, the broadcast will be stopped automatically, if it is still started. |
streamMode |
String | The stream mode for the broadcast. This can be set to one of the the following:
|
streams |
Array | An array of objects corresponding to streams currently being broadcast.
This is only set for a broadcast with the status set to "started" and
the streamMode set to "manual". Each object in the array includes the following properties:
|
multiBroadcastTag |
String | Set this to support multiple broadcasts for the same session simultaneously. Set this
to a unique string for each simultaneous broadcast of an ongoing session.
Note that the multiBroadcastTag value is not included in the response
for the methods to list live streaming broadcasts and get information about a live
streaming broadcast. |
Methods
Name | Description |
---|---|
stop(callback) |
Stops the live streaming broadcast. |
stop(callback)
Stops the live streaming broadcast.
Broadcasts automatically stop recording after 120 minutes or when all clients have disconnected from the session being broadcast.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | The function to call upon completing the operation. Two arguments
are passed to the function:
|