Notes on HTML5 Video and iPhone
by Jonathan Stark
I spent a day last week debugging a some video issues for one of my QQ clients and took the following notes in hopes of committing the video behavior to memory.
- Poster image is only displayed until the video is loaded.
- True/false attributes do not require values.
- Video can be played (and heard) even when not visible.
i.e. video { display: none } - The autoplay attribute is ignored on iPhone.
i.e. will not autoplay no matter what - The controls attribute is ignored on iPhone.
i.e. controls are visible no matter what - The remote file is downloaded whether or not the user clicks play.
- You can interact with the DOM while iPhone video player is open.
- You can make a video autoplay on iPhone by navigating directly to the video url. However, this is useless within the context of an Ajax app because it spawns a browser window.
I think I’m right about all of these points, but it didn’t do exhaustive PPK-style testing. If I’m wrong about any of these, PLMK in the comments.
P.S. For an excellent example of what’s possible with HTML5 Video, check out SublimeVideo from Jilion.
UPDATE: It turns out that the user agent doesn’t download the entire video when the page first loads. Rather, it appears that a partial range of data is requested and the web server responds with a 206 status:
206 Partial Content
The server is delivering only part of the resource due to a range header sent by the client. This is used by tools like wget to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams.
Thanks to eric_carlson for this update.