com.opentok.Broadcast
public class Broadcast extends Object
Represents a live streaming broadcast of an OpenTok session.
Nested Class Summary
Nested Classes
Modifier and Type
Class
Description
static enum
Broadcast.StreamMode
Defines values used in the
BroadcastProperties.Builder.streamMode(com.opentok.Broadcast.StreamMode) method
and returned by the getStreamMode() method.
Method Summary
All MethodsStatic MethodsInstance MethodsConcrete Methods
Modifier and Type
Method
Description
long
getCreatedAt()
The time at which the broadcast was started, in milliseconds since the Unix epoch.
String
getHls()
The HLS URL (if there is one) of the broadcast.
String
getHlsStatus()
The HLS status of the broadcast if known.
String
getId()
The broadcast ID.
int
getMaxBitrate()
Maximum bitrate (bits per second) is an optional value allowed for the broadcast composing.
int
getMaxDuration()
The maximum duration of the broadcast in seconds.
String
getMultiBroadcastTag()
Returns the multiBroadcastTag if set for the Broadcast.
int
getProjectId()
The OpenTok API key associated with the broadcast.
String
getResolution()
The broadcast resolution.
List<Rtmp>
getRtmpList()
A list of RTMP URLs (if there are any) of the broadcast.
String
getSessionId()
The session ID of the OpenTok session associated with this broadcast.
String
getStatus()
The broadcast status, either "started" or "stopped".
Broadcast.StreamMode
getStreamMode()
The stream mode to used for selecting streams to be included in this archive:
StreamMode.AUTO or StreamMode.MANUAL.
long
getUpdatedAt()
The time at which the broadcast was updated, in milliseconds since the Unix epoch.
boolean
hasAudio()
Whether the broadcast has audio (true) or not (false).
boolean
hasVideo()
Whether the broadcast has video (true) or not (false).
static Broadcast
makeBroadcast()
Do not call the makeBroadcast() method.
String
toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Method Details
makeBroadcast
public static Broadcast makeBroadcast()
Do not call the makeBroadcast() method. To start a live streaming broadcast,
call the OpenTok.startBroadcast() method.
getId
public String getId()
The broadcast ID.
getSessionId
public String getSessionId()
The session ID of the OpenTok session associated with this broadcast.
getProjectId
public int getProjectId()
The OpenTok API key associated with the broadcast.
getCreatedAt
public long getCreatedAt()
The time at which the broadcast was started, in milliseconds since the Unix epoch.
getUpdatedAt
public long getUpdatedAt()
The time at which the broadcast was updated, in milliseconds since the Unix epoch.
getMaxDuration
public int getMaxDuration()
The maximum duration of the broadcast in seconds.
Returns: : The maximum duration.
getMaxBitrate
public int getMaxBitrate()
Maximum bitrate (bits per second) is an optional value allowed for the broadcast composing.
Returns: : The maximum bitrate.
getResolution
public String getResolution()
The broadcast resolution.
getStatus
public String getStatus()
The broadcast status, either "started" or "stopped".
getMultiBroadcastTag
public String getMultiBroadcastTag()
Returns the multiBroadcastTag if set for the Broadcast.
getHls
public String getHls()
The HLS URL (if there is one) of the broadcast.
getHlsStatus
public String getHlsStatus()
The HLS status of the broadcast if known. One of: "connecting", "ready", "live", "ended", "error".
Returns: : The HLS status as a string (if applicable).
getRtmpList
public List<Rtmp> getRtmpList()
A list of RTMP URLs (if there are any) of the broadcast.
hasAudio
public boolean hasAudio()
Whether the broadcast has audio (true) or not (false).
hasVideo
public boolean hasVideo()
Whether the broadcast has video (true) or not (false).
getStreamMode
public Broadcast.StreamMode getStreamMode()
The stream mode to used for selecting streams to be included in this archive:
StreamMode.AUTO or StreamMode.MANUAL.
toString
public String toString()
Overrides:
: toString in class Object