Class: StreamManager

Constructor

StreamManager

new StreamManager(mediaElement)

Parameter

mediaElement

Optional

The HTML media element where playback will occur. Only provide if using a custom player.

Value may be null.

Throws

when required parameters are not supplied.

  • @implements {EventTarget}

Methods

getStreamId

getStreamId() returns string

Returns the stream id for the current stream.

Returns

nullable string 

replaceAdTagParameters

replaceAdTagParameters(adTagParameters)

Replaces all of the ad tag parameters used for upcoming ad requests for a live stream.

Parameter

adTagParameters

Object with string properties

The new ad tag parameters. Must have string values.

Value must not be null.

requestStream

requestStream(loadRequest, streamRequest) returns Promise containing nullable CafLoadInterceptorReturnType

Requests a stream to be loaded using provided stream parameters. Populates the loadRequest with the loaded stream data.

Parameter

loadRequest

cast.framework.messages.LoadRequestData

Value must not be null.

streamRequest

StreamRequest

Value must not be null.

Returns

non-null Promise containing nullable CafLoadInterceptorReturnType 

reset

reset()

Resets the stream manager and removes any continuous polling.