media elements and events Flashcards
Name the media element attributes.
scr, preload, autoplay, mediagroup, loop, muted and controls are the media element attributes.
When are the pending events and callbacks for media element discarded?
The pending events and callbacks for media element are discarded when the media element starts loading a new resource.
When is a media element potentially playing?
A media element is said to be potentially playing when its paused attribute is false.
How many tracklist objects of a media element are there?
There are two tracklist objects namely: multipletracklist object and exclusivetracklist object.
What are media events?
Media events are those events which are triggered by media like videos, images and audio.
What does media event oncanplay do?
This event allows the script to be executed when media can start play, but might have to stop for buffering.
What does media event oncanplaythrough do?
This event allows the script to be executed when media can be played to the end, without stopping for buffering.
What does media event onemptied do?
This event allows the script to be run when a media resource element suddenly becomes empty (network errors, errors on load etc.)
What does media event onloadedmetadata do?
This event allows the script to be run when the duration and other media data of a media element is loaded.
What does media event onstalled do?
This event allows a script to be executed when there is an error in fetching media data.
What does media event onvolumechange do?
This event allows a script to be executed when media changes the volume, also when volume is set to “mute”.
What does media event onwaiting do?
This event allows a script to be executed when media has stopped playing, but is expected to resume.