[whatwg] [mimesniff] Review request: Parsing a MIME type

Peter Occil poccil14 at gmail.com
Sat Jun 1 18:06:04 PDT 2013

Thanks for adding it for me; I forget to use Reply All.

What I intended is to use the result of canPlayType to determine
how a browser parses a certain MIME type.  Especially if there are duplicate
"codecs" parameters. For example, if a browser
returns "probably" from the canPlayType method with the following MIME type:

  video/mp4; codecs=avc1.42E01E

will it also return "probably" from this MIME type?

  video/mp4; codecs=foobar; codecs=avc1.42E01E

Or from this MIME type?

  video/mp4; codecs=avc1.42E01E; codecs=foobar

As you mentioned before, with respect to which value is used if a
parameter appears more than once, the answer might be different
depending on the browser.

-----Original Message----- 
From: Gordon P. Hemsley
Sent: Saturday, June 01, 2013 8:25 PM
To: Peter Occil ; whatwg List
Subject: Re: [whatwg] [mimesniff] Review request: Parsing a MIME type

(Re-added the list; I hope that's OK.)

The canPlayType method (and similar mechanisms) are only
approximations of what the browser can support. The "codecs" is
generally not strictly necessary when the UA goes to actually play the
file—if the "codecs" parameter is missing, it can generally be
recovered by parsing/processing the file. Thus, it is not an
especially reliable testing method.


More information about the whatwg mailing list