Methods

enableStream

enableStream(streamIndex, enable)

Sets the enabled state of the stream.

Parameter

streamIndex

number

Stream index.

enable

boolean

Whether to enable or disable the stream.

getDuration

getDuration() returns number

Returns the duration of the media. If the media has no duration, e.g. live event, a negative value is returned. This should only be called after host.onManifestReady was invoked by the player.

Returns

number Duration of the media.

getQualityLevel

getQualityLevel(streamIndex) returns number

Gets the quality level used to play the stream.

Parameter

streamIndex

number

Stream index.

Returns

number Adaptive bitrate quality level.

getStreamCount

getStreamCount() returns number

Gets the stream count for the media.

Returns

number Stream count.

getStreamInfo

getStreamInfo(streamIndex) returns cast.player.api.StreamInfo

Gets stream information that includes codecs, mime type, and bitrates.

Parameter

streamIndex

number

Stream index.

Returns

non-null cast.player.api.StreamInfo Stream information.

isStreamEnabled

isStreamEnabled(streamIndex) returns boolean

Gets the enabled state of the stream.

Parameter

streamIndex

number

Stream index.

Returns

boolean Whether the stream is enabled or disabled.