HTML5 …a work in progress
Now take the HTML5 video element for example. Now I don’t want to enter the already heated debate around video formats, I want to talk about the underlying video element. Firstly you would think it would be easy to detect if a video is playing though an attribute such as VideoElement.isPlaying however you would be mistaken, instead you have to:
Check if the Video has loaded
Check if the Video isn’t paused
Check if the Video isn’t buffering
Check if the Video hasn’t ended
Check if there hasn’t been an error
Easy I know… and then there are subtitles, or lack of them, their support is rather hit an miss. I tried to use SAMI subtitles (although I know this is an obscure format, this is what I had to work with) regrettably the video element doesn’t support them so I had to develop a way of rendering them myself. That didn’t sound so bad to begin with, SAMI is just sugar coated XML, which the XmlDOM parser won’t correctly load, horray!
In the end I had to create my own SAMI parser and use transparent DIVs infront of the video element to render the correct subtitles during the videos on time change event. All in a days work!