[ type ] PlayerEvent

Description:

Event object passed to MediaPlayer event handlers.

Type: Object

Properties:

Name Type Description

type

string

Type of the event. One of: loadstart, loadedmetadata, seeking, timeupdate, play, stop, subtitle.

[mediaType]

string

Type of media loaded in the player. One of: File, InputDevice, URL.

[media]

Media

A Media object containing details about the loaded media.

[currentTime]

number

Current playback time in seconds.

[duration]

number

Total duration of the media in seconds. Present when type is timeupdate.

[reason]

string

Reason for stopping playback. One of: Control, EndOfMediaFile, EndOfAudioStream, EndOfVideoStream, EndOfErrorStream, Error.

[index]

number

Index of a subtitle since the player started playing (not from the beginning of the video}. (Only present when event type is subtitle).

[fromTime]

string

Time when to show the subtitle relative to the position when the video started (not to the beginning of the video). (Only present when event type is subtitle).

[toTime]

string

Time when to show the subtitle relative to the position when the video started (not to the beginning of the video). (Only present when event type is subtitle).

[text]

string

Subtitle text. (Only present when event type is subtitle).

Also See: