Module: Receiver

Cast player constructor

Members


State :string

Describes the state of the player.

Type:
  • string
Properties:
Name Type Default Description
LAUNCHING string launching
LOADING string loading
BUFFERING string buffering
PLAYING string playing
PAUSED string paused
IDLE string idle

Methods


start()

Starts the player.


getPosition()

Gets the current playhead time.

Returns:

The current playhead time of the media.

Type
number

getDuration()

Gets the duration of media's playback.

Returns:

The current duration of the media in seconds. Returns Infinity if it's playing a live stream.

Type
number

getSeekableRange()

Gets the seekable range of the media.

Returns:

The current seekable time range of the media.

Type
module:Receiver~TimeRange

isLive()

Returns true if the current stream is live, otherwise returns false.

Returns:

True means the playing stream is live.

Type
boolean

Type Definitions


TimeRange

Type:
  • object
Properties:
Name Type Description
start number

Start time of the range.

end number

End time of the range.