Namespace: events

Classes

Namespace

Enumerations

DetailedErrorCode

static

number

Detailed Error code

Value

MEDIA_UNKNOWN

number

Returned when the HTMLMediaElement throws an error, but CAF does not recognize the specific error.

MEDIA_ABORTED

number

Returned when the fetching process for the media resource was aborted by the user agent at the user's request.

MEDIA_DECODE

number

Returned when an error occurred while decoding the media resource, after the resource was established to be usable.

MEDIA_NETWORK

number

Returned when a network error caused the user agent to stop fetching the media resource, after the resource was established to be usable.

MEDIA_SRC_NOT_SUPPORTED

number

Returned when the media resource indicated by the src attribute was not suitable.

SOURCE_BUFFER_FAILURE

number

Returned when a source buffer cannot be added to the MediaSource.

MEDIAKEYS_UNKNOWN

number

Returned when there is an unknown error with media keys.

MEDIAKEYS_NETWORK

number

Returned when there is a media keys failure due to a network issue.

MEDIAKEYS_UNSUPPORTED

number

Returned when a MediaKeySession object cannot be created.

MEDIAKEYS_WEBCRYPTO

number

Returned when crypto failed.

NETWORK_UNKNOWN

number

Returned when there was an unknown network issue.

SEGMENT_NETWORK

number

Returned when a segment fails to download.

HLS_NETWORK_MASTER_PLAYLIST

number

Returned when an HLS master playlist fails to download.

HLS_NETWORK_PLAYLIST

number

Returned when an HLS playlist fails to download.

HLS_NETWORK_NO_KEY_RESPONSE

number

Returned when an HLS key fails to download.

HLS_NETWORK_KEY_LOAD

number

Returned when a request for an HLS key fails before it is sent.

HLS_NETWORK_INVALID_SEGMENT

number

Returned when an HLS segment is invalid.

HLS_SEGMENT_PARSING

number

Returned when an HLS segment fails to parse.

DASH_NETWORK

number

Returned when an unknown network error occurs while handling a DASH stream.

DASH_NO_INIT

number

Returned when a DASH stream is missing an init.

SMOOTH_NETWORK

number

Returned when an unknown network error occurs while handling a Smooth stream.

SMOOTH_NO_MEDIA_DATA

number

Returned when a Smooth stream is missing media data.

MANIFEST_UNKNOWN

number

Returned when an unknown error occurs while parsing a manifest.

HLS_MANIFEST_MASTER

number

Returned when an error occurs while parsing an HLS master manifest.

HLS_MANIFEST_PLAYLIST

number

Returned when an error occurs while parsing an HLS playlist.

DASH_MANIFEST_UNKNOWN

number

Returned when an unknown error occurs while parsing a DASH manifest.

DASH_MANIFEST_NO_PERIODS

number

Returned when a DASH manifest is missing periods.

DASH_MANIFEST_NO_MIMETYPE

number

Returned when a DASH manifest is missing a MimeType.

DASH_INVALID_SEGMENT_INFO

number

Returned when a DASH manifest contains invalid segment info.

SMOOTH_MANIFEST

number

Returned when an error occurs while parsing a Smooth manifest.

SEGMENT_UNKNOWN

number

Returned when an unknown segment error occurs.

TEXT_UNKNOWN

number

An unknown error occurred with a text stream.

APP

number

Returned when an error occurs outside of the framework (e.g., if an event handler throws an error).

BREAK_CLIP_LOADING_ERROR

number

Returned when break clip load interceptor fails.

BREAK_SEEK_INTERCEPTOR_ERROR

number

Returned when break seek interceptor fails.

IMAGE_ERROR

number

Returned when an image fails to load.

LOAD_INTERRUPTED

number

A load was interrupted by an unload, or by another load.

LOAD_FAILED

number

A load command failed.

MEDIA_ERROR_MESSAGE

number

An error message was sent to the sender.

GENERIC

number

Returned when an unknown error occurs.

EndedReason

static

string

Reasons for how playback ends.

Value

END_OF_STREAM

string

Playback ended because we reach the end of current stream.

ERROR

string

Playback ended because we encountered an error.

STOPPED

string

Playback ended because an operation forces us to stop the current stream.

INTERRUPTED

string

Playback ended because of a new loaded item.

SKIPPED

string

Playback ended because of a skip ad operation.

BREAK_SWITCH

string

Playback ended because of switching stitched break.

EventType

static

string

Player event types. For events that are proxied from the MediaElement, see https://dev.w3.org/html5/spec-preview/media-elements.html#mediaevents for more information.

Value

ALL

string

This is a special identifier which can be used to listen for all events (mostly used for debugging purposes). The event will be a subclass of cast.framework.events.Event.

ABORT

string

Fired when the browser stops fetching the media before it is completely downloaded, but not due to an error. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

CAN_PLAY

string

Fired when the browser can resume playback of the clip, but estimates that not enough data has been loaded to play the clip to its end without having to stop for buffering. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

CAN_PLAY_THROUGH

string

Fired when the browser estimates that it can play the clip to its end without stopping for buffering. Note that the browser estimate only pertains to the current clip being played (ie: if currently playing an ad clip, the browser will estimate only for the ad clip and not the complete content). This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

DURATION_CHANGE

string

Fired when the duration attribute of the MediaElement has changed. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

EMPTIED

string

Fired when the media has become empty. One example where this would happen is when load() is called to reset the MediaElement. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

ENDED

string

Fired when a media clip has played to its full duration. This does not include when the clip has stopped playing due to an error or stop request. In the case that ads are present, this is fired at most once per ad, and at most once for the main content. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent. If you want to know when the media is done playing, you most likely want to use cast.framework.events.EventType.MEDIA_FINISHED.

LOADED_DATA

string

Fired when the browser has finished loading the first frame of the media clip. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

LOADED_METADATA

string

Fired when the browser has finished loading the metadata for a clip. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

LOAD_START

string

Fired when the browser begins looking for media data for a clip. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

PAUSE

string

Fired when playback is paused. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaPauseEvent.

PLAY

string

Fired when playback is ready to start (ie: after being paused). This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

PLAYING

string

Fired when playback has started. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

PROGRESS

string

Fired when the browser is fetching media data. If you are using adaptive bitrate streaming (ie: HLS, DASH, SMOOTH), you most likely want to use the cast.framework.events.EventType.SEGMENT_DOWNLOADED event instead. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

RATE_CHANGE

string

Fired when the playback rate has been updated. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

SEEKED

string

Fired when a seek has finished. This will not be fired in case seeking finishes when the media is paused. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

SEEKING

string

Fired when the media is being seeked. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

STALLED

string

Fired when the browser is trying to fetch media data, but did not receive a response. The cast.framework.events.EventType.BUFFERING event is implemented consistently across stream types, and should be used instead of 'stalled' when trying to check if the player is buffering. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

TIME_UPDATE

string

Fired periodically while the media is playing. This will fire whenever the currentTime attribute changes. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

SUSPEND

string

Fired when the browser is intentionally not fetching media data. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

WAITING

string

Fired when playback has stopped because the browser is waiting for the next frame to become available. The cast.framework.events.EventType.BUFFERING event is implemented consistently across stream types, and should be used instead of 'waiting' when trying to check if the player is buffering. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

BITRATE_CHANGED

string

Fired when the bitrate of the playing media changes (such as when an active track is changed, or when a different bitrate is chosen in response to network conditions). Event is a cast.framework.events.BitrateChangedEvent.

BREAK_STARTED

string

Fired when the first break clip in a break is start loading. Event is a cast.framework.events.BreaksEvent.

BREAK_ENDED

string

Fired when the last break clip in a break ends. Event is a cast.framework.events.BreaksEvent.

BREAK_CLIP_LOADING

string

Fired when a break clip starts loading. Event is a cast.framework.events.BreaksEvent.

BREAK_CLIP_STARTED

string

Fired when a break clip starts. Event is a cast.framework.events.BreaksEvent.

BREAK_CLIP_ENDED

string

Fired when a break clip ends. Event is a cast.framework.events.BreaksEvent.

BUFFERING

string

Fired when playback has either stopped due to buffering, or started again after buffering has finished. Event is a cast.framework.events.BufferingEvent.

CACHE_LOADED

string

Fired when content pre-cached by fastplay has finished loading. Event is a cast.framework.events.CacheLoadedEvent.

CACHE_HIT

string

Fired when content pre-cached by fastplay is used. Event is a cast.framework.events.CacheItemEvent.

CACHE_INSERTED

string

Fired when one single URL is being cached by fastplay. Event is a cast.framework.events.CacheItemEvent.

CLIP_STARTED

string

Fired when any clip first starts to play. This includes break clips and main content clips between break clips. If you want to see when a break clip starts, you should use cast.framework.events.EventType.BREAK_CLIP_STARTED. Event is a cast.framework.events.Event.

CLIP_ENDED

string

Fired when any clip ends. This includes break clips and main content clips between break clips. If you want to see when a break clip ends, you should use cast.framework.events.EventType.BREAK_CLIP_ENDED. If you want to see when the media is completely done playing, you should use cast.framework.events.EventType.MEDIA_FINISHED. Event is a cast.framework.events.ClipEndedEvent.

EMSG

string

Fired when an emsg is found in a segment. This will only be fired for DASH content. Event is a cast.framework.events.EmsgEvent.

ERROR

string

Fired when an error occurs. Event is an cast.framework.events.ErrorEvent.

ID3

string

Fired when an ID3 tag is encountered. This will only be fired for HLS content. Event is a cast.framework.events.Id3Event.

MEDIA_STATUS

string

Fired before an outgoing message is sent containing current media status. Event is a cast.framework.events.MediaStatusEvent.

CUSTOM_STATE

string

Fired when an outgoing custom state message is sent. Event is a cast.framework.events.CustomStateEvent.

MEDIA_INFORMATION_CHANGED

string

Fired if the media information is changed during playback. For example when playing a live radio and the track metadata changed. Event is a cast.framework.events.MediaInformationChangedEvent

MEDIA_FINISHED

string

Fired when the media has completely finished playing. This includes the following cases: there is nothing left in the stream to play, user has requested a stop, or an error has occurred. When queueing is used, this event will trigger once for each queue item that finishes. Event is a cast.framework.events.MediaFinishedEvent.

PLAYER_PRELOADING

string

Fired when the player begins to handle a preload request. Event is a cast.framework.events.LoadEvent.

PLAYER_PRELOADING_CANCELLED

string

Fired if the player cancels preloading. Event is a cast.framework.events.LoadEvent.

PLAYER_LOAD_COMPLETE

string

Fired when the player has finished processing a load request and is ready to play. Event is a cast.framework.events.LoadEvent.

PLAYER_LOADING

string

Fired when the player begins to handle a load request. This would fire before the cast.framework.events.EventType.LOAD_START event, since the player has not requested media data yet. Event is a cast.framework.events.LoadEvent.

SEGMENT_DOWNLOADED

string

Fired when a segment is finished downloading. This will only be triggered for adaptive streaming content (HLS, DASH, or Smooth). Event is a cast.framework.events.SegmentDownloadedEvent.

REQUEST_SEEK

string

Fired when a seek request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_LOAD

string

Fired when a load request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_STOP

string

Fired when a stop request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PAUSE

string

Fired when a pause request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PRECACHE

string

Fired when a precache request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PLAY

string

Fired when a play request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_SKIP_AD

string

Fired when a skip ad request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PLAY_AGAIN

string

Fired when a play again request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PLAYBACK_RATE_CHANGE

string

Fired when a playback rate change request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_VOLUME_CHANGE

string

Fired when a volume change request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_EDIT_TRACKS_INFO

string

Fired when an edit tracks info request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_EDIT_AUDIO_TRACKS

string

Fired when an edit audio tracks request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_SET_CREDENTIALS

string

Fired when a set credentials request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_LOAD_BY_ENTITY

string

Fired when a load by entity request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_USER_ACTION

string

Fired when a user action request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_DISPLAY_STATUS

string

Fired when a dsiplay status tracks request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_CUSTOM_COMMAND

string

Fired when a custom command request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_FOCUS_STATE

string

Fired when a focus state request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_QUEUE_LOAD

string

Fired when a queue load request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_INSERT

string

Fired when a queue insert request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_UPDATE

string

Fired when a queue update request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_REMOVE

string

Fired when a queue remove request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_REORDER

string

Fired when a queue reorder request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_GET_ITEM_RANGE

string

Fired when a fetch items request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_GET_ITEMS

string

Fired when a get items info request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_GET_ITEM_IDS

string

Fired when a get queue ids request is made. Event is a cast.framework.events.RequestEvent.

LIVE_IS_MOVING_WINDOW_CHANGED

string

Fired when live seekable range isMovingWindow changed, more specifically, when a moving window changes to a expanding window or vice versa. Event is a cast.framework.events.LiveStatusEvent.

LIVE_ENDED

string

Fired when live is just ended. Event is a cast.framework.events.LiveStatusEvent.

TIMED_METADATA_CHANGED

string

When timed metadata is found in DASH (EventStream) or HLS (EXT-X-DATERANGE), this event is fired after PLAYER_LOAD_COMPLETE when new timed metadata is encountered in live content. Event is a cast.framework.events.TimedMetadataEvent.

TIMED_METADATA_ENTER

string

Fired when the playhead enters a timeline region in DASH or reaches an EXT-X-DATERANGE tag. Event is a cast.framework.events.TimedMetadataEvent.

TIMED_METADATA_EXIT

string

Fired when the playhead exits a timeline region in DASH or leaves an EXT-X-DATERANGE tag. Event is a cast.framework.events.TimedMetadataEvent.

Properties

DetailedErrorCode

static

number

Detailed Error code

Value

MEDIA_UNKNOWN

number

Returned when the HTMLMediaElement throws an error, but CAF does not recognize the specific error.

MEDIA_ABORTED

number

Returned when the fetching process for the media resource was aborted by the user agent at the user's request.

MEDIA_DECODE

number

Returned when an error occurred while decoding the media resource, after the resource was established to be usable.

MEDIA_NETWORK

number

Returned when a network error caused the user agent to stop fetching the media resource, after the resource was established to be usable.

MEDIA_SRC_NOT_SUPPORTED

number

Returned when the media resource indicated by the src attribute was not suitable.

SOURCE_BUFFER_FAILURE

number

Returned when a source buffer cannot be added to the MediaSource.

MEDIAKEYS_UNKNOWN

number

Returned when there is an unknown error with media keys.

MEDIAKEYS_NETWORK

number

Returned when there is a media keys failure due to a network issue.

MEDIAKEYS_UNSUPPORTED

number

Returned when a MediaKeySession object cannot be created.

MEDIAKEYS_WEBCRYPTO

number

Returned when crypto failed.

NETWORK_UNKNOWN

number

Returned when there was an unknown network issue.

SEGMENT_NETWORK

number

Returned when a segment fails to download.

HLS_NETWORK_MASTER_PLAYLIST

number

Returned when an HLS master playlist fails to download.

HLS_NETWORK_PLAYLIST

number

Returned when an HLS playlist fails to download.

HLS_NETWORK_NO_KEY_RESPONSE

number

Returned when an HLS key fails to download.

HLS_NETWORK_KEY_LOAD

number

Returned when a request for an HLS key fails before it is sent.

HLS_NETWORK_INVALID_SEGMENT

number

Returned when an HLS segment is invalid.

HLS_SEGMENT_PARSING

number

Returned when an HLS segment fails to parse.

DASH_NETWORK

number

Returned when an unknown network error occurs while handling a DASH stream.

DASH_NO_INIT

number

Returned when a DASH stream is missing an init.

SMOOTH_NETWORK

number

Returned when an unknown network error occurs while handling a Smooth stream.

SMOOTH_NO_MEDIA_DATA

number

Returned when a Smooth stream is missing media data.

MANIFEST_UNKNOWN

number

Returned when an unknown error occurs while parsing a manifest.

HLS_MANIFEST_MASTER

number

Returned when an error occurs while parsing an HLS master manifest.

HLS_MANIFEST_PLAYLIST

number

Returned when an error occurs while parsing an HLS playlist.

DASH_MANIFEST_UNKNOWN

number

Returned when an unknown error occurs while parsing a DASH manifest.

DASH_MANIFEST_NO_PERIODS

number

Returned when a DASH manifest is missing periods.

DASH_MANIFEST_NO_MIMETYPE

number

Returned when a DASH manifest is missing a MimeType.

DASH_INVALID_SEGMENT_INFO

number

Returned when a DASH manifest contains invalid segment info.

SMOOTH_MANIFEST

number

Returned when an error occurs while parsing a Smooth manifest.

SEGMENT_UNKNOWN

number

Returned when an unknown segment error occurs.

TEXT_UNKNOWN

number

An unknown error occurred with a text stream.

APP

number

Returned when an error occurs outside of the framework (e.g., if an event handler throws an error).

BREAK_CLIP_LOADING_ERROR

number

Returned when break clip load interceptor fails.

BREAK_SEEK_INTERCEPTOR_ERROR

number

Returned when break seek interceptor fails.

IMAGE_ERROR

number

Returned when an image fails to load.

LOAD_INTERRUPTED

number

A load was interrupted by an unload, or by another load.

LOAD_FAILED

number

A load command failed.

MEDIA_ERROR_MESSAGE

number

An error message was sent to the sender.

GENERIC

number

Returned when an unknown error occurs.

EndedReason

static

string

Reasons for how playback ends.

Value

END_OF_STREAM

string

Playback ended because we reach the end of current stream.

ERROR

string

Playback ended because we encountered an error.

STOPPED

string

Playback ended because an operation forces us to stop the current stream.

INTERRUPTED

string

Playback ended because of a new loaded item.

SKIPPED

string

Playback ended because of a skip ad operation.

BREAK_SWITCH

string

Playback ended because of switching stitched break.

EventType

static

string

Player event types. For events that are proxied from the MediaElement, see https://dev.w3.org/html5/spec-preview/media-elements.html#mediaevents for more information.

Value

ALL

string

This is a special identifier which can be used to listen for all events (mostly used for debugging purposes). The event will be a subclass of cast.framework.events.Event.

ABORT

string

Fired when the browser stops fetching the media before it is completely downloaded, but not due to an error. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

CAN_PLAY

string

Fired when the browser can resume playback of the clip, but estimates that not enough data has been loaded to play the clip to its end without having to stop for buffering. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

CAN_PLAY_THROUGH

string

Fired when the browser estimates that it can play the clip to its end without stopping for buffering. Note that the browser estimate only pertains to the current clip being played (ie: if currently playing an ad clip, the browser will estimate only for the ad clip and not the complete content). This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

DURATION_CHANGE

string

Fired when the duration attribute of the MediaElement has changed. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

EMPTIED

string

Fired when the media has become empty. One example where this would happen is when load() is called to reset the MediaElement. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

ENDED

string

Fired when a media clip has played to its full duration. This does not include when the clip has stopped playing due to an error or stop request. In the case that ads are present, this is fired at most once per ad, and at most once for the main content. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent. If you want to know when the media is done playing, you most likely want to use cast.framework.events.EventType.MEDIA_FINISHED.

LOADED_DATA

string

Fired when the browser has finished loading the first frame of the media clip. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

LOADED_METADATA

string

Fired when the browser has finished loading the metadata for a clip. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

LOAD_START

string

Fired when the browser begins looking for media data for a clip. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

PAUSE

string

Fired when playback is paused. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaPauseEvent.

PLAY

string

Fired when playback is ready to start (ie: after being paused). This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

PLAYING

string

Fired when playback has started. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

PROGRESS

string

Fired when the browser is fetching media data. If you are using adaptive bitrate streaming (ie: HLS, DASH, SMOOTH), you most likely want to use the cast.framework.events.EventType.SEGMENT_DOWNLOADED event instead. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

RATE_CHANGE

string

Fired when the playback rate has been updated. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

SEEKED

string

Fired when a seek has finished. This will not be fired in case seeking finishes when the media is paused. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

SEEKING

string

Fired when the media is being seeked. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

STALLED

string

Fired when the browser is trying to fetch media data, but did not receive a response. The cast.framework.events.EventType.BUFFERING event is implemented consistently across stream types, and should be used instead of 'stalled' when trying to check if the player is buffering. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

TIME_UPDATE

string

Fired periodically while the media is playing. This will fire whenever the currentTime attribute changes. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

SUSPEND

string

Fired when the browser is intentionally not fetching media data. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

WAITING

string

Fired when playback has stopped because the browser is waiting for the next frame to become available. The cast.framework.events.EventType.BUFFERING event is implemented consistently across stream types, and should be used instead of 'waiting' when trying to check if the player is buffering. This event is forwarded from the MediaElement, and has been wrapped in a cast.framework.events.MediaElementEvent.

BITRATE_CHANGED

string

Fired when the bitrate of the playing media changes (such as when an active track is changed, or when a different bitrate is chosen in response to network conditions). Event is a cast.framework.events.BitrateChangedEvent.

BREAK_STARTED

string

Fired when the first break clip in a break is start loading. Event is a cast.framework.events.BreaksEvent.

BREAK_ENDED

string

Fired when the last break clip in a break ends. Event is a cast.framework.events.BreaksEvent.

BREAK_CLIP_LOADING

string

Fired when a break clip starts loading. Event is a cast.framework.events.BreaksEvent.

BREAK_CLIP_STARTED

string

Fired when a break clip starts. Event is a cast.framework.events.BreaksEvent.

BREAK_CLIP_ENDED

string

Fired when a break clip ends. Event is a cast.framework.events.BreaksEvent.

BUFFERING

string

Fired when playback has either stopped due to buffering, or started again after buffering has finished. Event is a cast.framework.events.BufferingEvent.

CACHE_LOADED

string

Fired when content pre-cached by fastplay has finished loading. Event is a cast.framework.events.CacheLoadedEvent.

CACHE_HIT

string

Fired when content pre-cached by fastplay is used. Event is a cast.framework.events.CacheItemEvent.

CACHE_INSERTED

string

Fired when one single URL is being cached by fastplay. Event is a cast.framework.events.CacheItemEvent.

CLIP_STARTED

string

Fired when any clip first starts to play. This includes break clips and main content clips between break clips. If you want to see when a break clip starts, you should use cast.framework.events.EventType.BREAK_CLIP_STARTED. Event is a cast.framework.events.Event.

CLIP_ENDED

string

Fired when any clip ends. This includes break clips and main content clips between break clips. If you want to see when a break clip ends, you should use cast.framework.events.EventType.BREAK_CLIP_ENDED. If you want to see when the media is completely done playing, you should use cast.framework.events.EventType.MEDIA_FINISHED. Event is a cast.framework.events.ClipEndedEvent.

EMSG

string

Fired when an emsg is found in a segment. This will only be fired for DASH content. Event is a cast.framework.events.EmsgEvent.

ERROR

string

Fired when an error occurs. Event is an cast.framework.events.ErrorEvent.

ID3

string

Fired when an ID3 tag is encountered. This will only be fired for HLS content. Event is a cast.framework.events.Id3Event.

MEDIA_STATUS

string

Fired before an outgoing message is sent containing current media status. Event is a cast.framework.events.MediaStatusEvent.

CUSTOM_STATE

string

Fired when an outgoing custom state message is sent. Event is a cast.framework.events.CustomStateEvent.

MEDIA_INFORMATION_CHANGED

string

Fired if the media information is changed during playback. For example when playing a live radio and the track metadata changed. Event is a cast.framework.events.MediaInformationChangedEvent

MEDIA_FINISHED

string

Fired when the media has completely finished playing. This includes the following cases: there is nothing left in the stream to play, user has requested a stop, or an error has occurred. When queueing is used, this event will trigger once for each queue item that finishes. Event is a cast.framework.events.MediaFinishedEvent.

PLAYER_PRELOADING

string

Fired when the player begins to handle a preload request. Event is a cast.framework.events.LoadEvent.

PLAYER_PRELOADING_CANCELLED

string

Fired if the player cancels preloading. Event is a cast.framework.events.LoadEvent.

PLAYER_LOAD_COMPLETE

string

Fired when the player has finished processing a load request and is ready to play. Event is a cast.framework.events.LoadEvent.

PLAYER_LOADING

string

Fired when the player begins to handle a load request. This would fire before the cast.framework.events.EventType.LOAD_START event, since the player has not requested media data yet. Event is a cast.framework.events.LoadEvent.

SEGMENT_DOWNLOADED

string

Fired when a segment is finished downloading. This will only be triggered for adaptive streaming content (HLS, DASH, or Smooth). Event is a cast.framework.events.SegmentDownloadedEvent.

REQUEST_SEEK

string

Fired when a seek request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_LOAD

string

Fired when a load request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_STOP

string

Fired when a stop request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PAUSE

string

Fired when a pause request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PRECACHE

string

Fired when a precache request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PLAY

string

Fired when a play request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_SKIP_AD

string

Fired when a skip ad request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PLAY_AGAIN

string

Fired when a play again request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_PLAYBACK_RATE_CHANGE

string

Fired when a playback rate change request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_VOLUME_CHANGE

string

Fired when a volume change request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_EDIT_TRACKS_INFO

string

Fired when an edit tracks info request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_EDIT_AUDIO_TRACKS

string

Fired when an edit audio tracks request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_SET_CREDENTIALS

string

Fired when a set credentials request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_LOAD_BY_ENTITY

string

Fired when a load by entity request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_USER_ACTION

string

Fired when a user action request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_DISPLAY_STATUS

string

Fired when a dsiplay status tracks request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_CUSTOM_COMMAND

string

Fired when a custom command request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_FOCUS_STATE

string

Fired when a focus state request is made. Event is a cast.framework.events.request.RequestEvent.

REQUEST_QUEUE_LOAD

string

Fired when a queue load request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_INSERT

string

Fired when a queue insert request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_UPDATE

string

Fired when a queue update request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_REMOVE

string

Fired when a queue remove request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_REORDER

string

Fired when a queue reorder request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_GET_ITEM_RANGE

string

Fired when a fetch items request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_GET_ITEMS

string

Fired when a get items info request is made. Event is a cast.framework.events.RequestEvent.

REQUEST_QUEUE_GET_ITEM_IDS

string

Fired when a get queue ids request is made. Event is a cast.framework.events.RequestEvent.

LIVE_IS_MOVING_WINDOW_CHANGED

string

Fired when live seekable range isMovingWindow changed, more specifically, when a moving window changes to a expanding window or vice versa. Event is a cast.framework.events.LiveStatusEvent.

LIVE_ENDED

string

Fired when live is just ended. Event is a cast.framework.events.LiveStatusEvent.

TIMED_METADATA_CHANGED

string

When timed metadata is found in DASH (EventStream) or HLS (EXT-X-DATERANGE), this event is fired after PLAYER_LOAD_COMPLETE when new timed metadata is encountered in live content. Event is a cast.framework.events.TimedMetadataEvent.

TIMED_METADATA_ENTER

string

Fired when the playhead enters a timeline region in DASH or reaches an EXT-X-DATERANGE tag. Event is a cast.framework.events.TimedMetadataEvent.

TIMED_METADATA_EXIT

string

Fired when the playhead exits a timeline region in DASH or leaves an EXT-X-DATERANGE tag. Event is a cast.framework.events.TimedMetadataEvent.