Bug 20360 - MIME type parameters break <video> and <audio> elements
Summary: MIME type parameters break <video> and <audio> elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-08-12 09:08 PDT by Eric Carlson
Modified: 2008-08-13 16:51 PDT (History)
0 users

See Also:


Attachments
Patch to strip parameters from the MIME type before checking with the type registry (2.22 KB, patch)
2008-08-12 09:14 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Revised patch (3.29 KB, patch)
2008-08-12 09:59 PDT, Eric Carlson
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2008-08-12 09:08:18 PDT
A MIME type can have various parameters after the type which add extra meaning, but WebKit doesn't deal with them.

Open http://hsivonen.iki.fi/test/moz/video-selection/source-mp4-ogg-params.html, which contains:

<video controls autoplay>
    <source src='html5-test.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
    <source src='html5-test.ogg' type='application/ogg; codecs="theora, vorbis"'>
    FAIL: This is fallback text.
</video>

  In Safari, WebKit should display 'html5-test.mp4', but it does not because the MIME type registry doesn't match 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'.
Comment 1 Eric Carlson 2008-08-12 09:14:20 PDT
Created attachment 22749 [details]
Patch to strip parameters from the MIME type before checking with the type registry
Comment 2 Eric Carlson 2008-08-12 09:19:45 PDT
<rdar://6137931>
Comment 3 Adele Peterson 2008-08-12 09:19:52 PDT
Comment on attachment 22749 [details]
Patch to strip parameters from the MIME type before checking with the type registry

You've got some tabs in the patch- you should replace those with spaces.

You also want to generate and checkin results for the test, and make a ChangeLog entry for the LayoutTests directory.
Comment 4 Eric Carlson 2008-08-12 09:59:57 PDT
Created attachment 22751 [details]
Revised patch
Comment 5 Adele Peterson 2008-08-13 16:51:16 PDT
Committed revision 35729.