HTML and CSS Reference
In-Depth Information
Table7.Methods for MediaController Interface
Property
Purpose
Returns a reference to the TimeRanges object, representing the time ranges of the
slaved media resources
buffered
Returns a reference to the TimeRanges object, representing the time ranges the user
agent can seek to
seekable
The difference between earliest playable moment and latest playable moment
duration
Current playback time in seconds
currentTime
Set to true if playback currently paused; otherwise false
paused
A TimeRanges object representing a union of the played time ranges in all of the
slaved media elements
played
defaultPlaybackRate The default rate of playback (can be changed)
Current playback rate
playbackRate
Change volume, from 0.0 to 1.0
volume
Set to true if all audio is muted
muted
MediaController events are also very similar to HTMLMediaElement events, as shown in
Table 8 . They key difference is, again, an event is only triggered when conditions are met for
all of the slaved media resources. Take an event like waiting. It's triggered in the HTMLMe-
diaElement when playback is blocked because the next frame isn't currently available, but the
user agent is expecting it to become available. With the MediaController, waiting generally
means the same thing, but it comes about because one of the media resources is blocked, not
necessarily because all the media resources are blocked.
The MediaController adds new meaning to the old phrase: all for one, and one for all.
Search WWH ::




Custom Search