Package com.opentok
Class Broadcast
java.lang.Object
com.opentok.Broadcast
Represents a live streaming broadcast of an OpenTok session.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines values used in theBroadcastProperties.Builder.streamMode(com.opentok.Broadcast.StreamMode)
method and returned by thegetStreamMode()
method. -
Method Summary
Modifier and TypeMethodDescriptionlong
The time at which the broadcast was started, in milliseconds since the Unix epoch.getHls()
The HLS URL (if there is one) of the broadcast.The HLS status of the broadcast if known.getId()
The broadcast ID.int
Maximum bitrate (bits per second) is an optional value allowed for the broadcast composing.int
The maximum duration of the broadcast in seconds.Returns the multiBroadcastTag if set for the Broadcast.int
The OpenTok API key associated with the broadcast.The broadcast resolution.A list of RTMP URLs (if there are any) of the broadcast.The session ID of the OpenTok session associated with this broadcast.The broadcast status, either "started" or "stopped".The stream mode to used for selecting streams to be included in this archive:StreamMode.AUTO
orStreamMode.MANUAL
.long
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
Do not call themakeBroadcast()
method.toString()
-
Method Details
-
makeBroadcast
Do not call themakeBroadcast()
method. To start a live streaming broadcast, call theOpenTok.startBroadcast()
method. -
getId
The broadcast ID. -
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
The broadcast resolution. -
getStatus
The broadcast status, either "started" or "stopped". -
getMultiBroadcastTag
Returns the multiBroadcastTag if set for the Broadcast. -
getHls
The HLS URL (if there is one) of the broadcast. -
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
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
The stream mode to used for selecting streams to be included in this archive:StreamMode.AUTO
orStreamMode.MANUAL
. -
toString
-