WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
44519
HTMLMediaElement.canPlayType gives wrong results on the iPhone
https://bugs.webkit.org/show_bug.cgi?id=44519
Summary
HTMLMediaElement.canPlayType gives wrong results on the iPhone
Niels Leenheer (HTML5test)
Reported
2010-08-24 06:10:39 PDT
The canPlayType() function gives back wrong information on the iPhone and iPad (tested with iOS 3.2 and 4). Safari for iOS will report back "probably: for containers that it supports when only a MIME type is specified. This is something that is explicitly discouraged by the specification. When no codecs parameter is present, it should report "maybe" at best. v=document.createElement('video'); v.canPlayType('video/mp4') -> probably // incorrect, should be maybe When a codecs parameter is present, Safari will strangely report back "maybe" for all MIME types it recognized, regardless of the contents of the codecs parameter. The proper response would be to report back "probably" for supported codecs and an empty string for codecs it doesn’t recognize. v=document.createElement('video'); v.canPlayType('video/mp4; codecs="avc1.42E01E"') -> maybe // incorrect, should be probably v=document.createElement('video'); v.canPlayType('video/mp4; codecs="foobar"') -> maybe // incorrect, should be "" This bug makes codec detection impossible on the iPhone and needs to be fixed as soon as possible.
Attachments
Add attachment
proposed patch, testcase, etc.
Niels Leenheer (HTML5test)
Comment 1
2010-08-24 06:18:22 PDT
Html5test.com currently uses a workaround for codec detection on the iPhone. This workaround will probably be removed in an upcoming version of the test. The result is that Safari for the iPhone will no longer score bonus points for codecs. The idea is that if you can't properly detect a codec, it is not properly supported. Especially on mobile devices canPlayType is essential, because you can't simply try to load the stream and see what happens.
Alexey Proskuryakov
Comment 2
2010-08-24 12:09:31 PDT
Please file iOS specific bugs via
http://bugreport.apple.com
, because iOS WebKit isn't built directly from webkit.org sources.
Niels Leenheer (HTML5test)
Comment 3
2010-08-24 14:50:21 PDT
Radar #8349691
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug