I am reading and taking notes on the HTML specifications for 100 days as part of #The100DayProject. Read the initial intent/backstory. I am a Microsoft employee but all opinions, comments, etc on this site are my own. I do not speak on behalf of my employer, and thus no comments should be taken as representative of Microsoft’s official opinion of the spec. Subsections not listed below were read without comment.
UAs = user agents = browsers, etc.
Continuing to read in 4.7.10 Media elements
22.214.171.124 Loading the media resource
(Further headings in this post are my own)
media.load() method “causes the element to reset and start selecting and loading a new media resource from scratch”. This means any “pending events and callbacks” the media element may have are scrapped.
The media element load algorithm
“All media elements have an autoplaying flag, which must begin in the true state.” I wonder why?
Interesting that the media element load algorithm directs UAs to initially set particular attributes to Not-a-Number (NaN). I would have assumed that unset attributes would just be…empty.
The resource selection algorithm
This algorithm is invoked synchronously, but after a couple steps runs asynchronously (at the same time as other scripts and tasks). Suppose this is why there’s some setting and unsetting of the delaying-the-load-event to true.
These media algorithms are pretty involved. I want to find the person(s) at work who implemented them and shake their hand(s).