UNCONFIRMED 44517
HTMLMediaElement.canPlayType gives false positives in Safari
https://bugs.webkit.org/show_bug.cgi?id=44517
Summary HTMLMediaElement.canPlayType gives false positives in Safari
Niels Leenheer (HTML5test)
Reported 2010-08-24 05:28:00 PDT
When a codecs parameter is provided and the MIME type is supported, canPlayType() always returns "probably" regardless of the contents of the codecs parameter. This results in false positives and makes it impossible to reliably detect codec support in Safari. For example: v=document.createElement('video'); v.canPlayType('video/mp4') -> maybe // correct v=document.createElement('video'); v.canPlayType('video/mp4; codecs="avc1.42E01E"') -> probably // correct v=document.createElement('video'); v.canPlayType('video/mp4; codecs="theora"') -> probably // incorrect v=document.createElement('video'); v.canPlayType('video/mp4; codecs="iv50"') -> probably // incorrect The canPlayType() function should only return "probably" when the codecs parameter represents an actually supported codec. Unknown codec parameters should return an empty string. See also: http://rakaz.nl/2010/06/problems-with-html5-video-codec-detection.html
Attachments
Niels Leenheer (HTML5test)
Comment 1 2010-08-24 06:02:51 PDT
I filed a similar bug against Chrome: http://code.google.com/p/chromium/issues/detail?id=53193 The problem is Chrome is slightly different from the problem in Safari. Chrome only accepts codecs parameters that are supported, but allows MIME type and codec mismatches. For example Theora in an MP4 container will return "probably". Unlike Chrome, Safari will also accept codecs parameters that are not supported at all. For example: v=document.createElement('video'); v.canPlayType('video/mp4; codecs="foobar"') -> probably // incorrect
Note You need to log in before you can comment on or make changes to this bug.