Where the media should stop playing or loop at. Implementations should default this to Infinity
The height the media should render at. Any implementation should render the media in coverage style; the media should cover the full height, even if it cuts off parts of the width
Determines if the media should loop when end
is reached. Implementations should default this to false
If supported, the onPositionChange
function will only be invoked when the duration has changed by this interval
or is seeked to a new position
An optional poster image that can be displayed whilst the video buffers. Setting a poster will resolve the
onLoad
callback once the image is loaded (or video, whichever is first). Essentially, the onLoad
callback
is a callback to the DOM component to denote that it can now show the element.
The starting point that the media should play at. The media should reset to this position when stopped or looping.
Implementations should default this to 0
The inital state of the media. The default is State.Stopped
. Setting it to State.Buffering
will start
buffering the data (if supported). State.Playing
will start the media as soon as it is possible to. It is highly
likely that setting the initial state to State.Playing
will result in a initial state of State.Buffering
until
there is enough data to actually play
The location of the asset to load
The width the media should render at. Any implementation should render the media in coverage style; the media should cover the full width, even if it cuts off parts of the height
Invoked when the dimensions of the media is known. Not this can be invoked before the media is loaded as the dimensions can often be read from the header data of the media source
the current state of the media
Will be invoked when the duration of the media is known
the duration of the media
Invoked when the media creates a loading error or another fatal error
the error that occurred
the resource
Invoked when the resource has completed loading
the loaded resource
Will be invoked whenever the position of the media changes. This will be updated at positionInterval
intervals
the current location in the media, will be relative to start
Provides progress updates on the loading resource.
values in the range [0, 1]
Invoked whenever the playable state of the media changes. This can be used to update the visual state of UI components
the current state of the media
Prevent a video from stealing the audio focus, causing other playing audio on the device to stop.