Go ahead, look at the documentation for this function. For those of you who don’t like to follow links, you would be looking at the documentation for a function attached to any html5 video element. It accepts a mimeType, a set of codecs and well… here is the the rub. What would you expect it to return?
I expected a boolean. The guy who worked on this problem before me tested it as though it were a boolean…
if (video.canPlayType(mime + ";codecs='" + codec + "'"))
In fact, after polling the friends around me, every single one of the 15 people I have asked expected the same. In reality it returns either “probably”, “maybe” or “”. This is probably the most non-committal function in the history of time.
Further, imagine my surprise when I opened Safari up, yes I’m on a mac, and passed it 20 different combinations of videos and codecs, all of them return something odd – “maybe”. Not only did this happen for mpeg, which is absolutely supported, but it also returned maybe for wmv and avi files, which were absolutely not supported. I can only hope that this function works better on the iPad/iPhone and Android devices.
Until then, I’m going to be using something else.