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
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
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
Where the media should stop playing or loop at. Implementations should default this to
Infinity