W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2013

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

From: Gordon P. Hemsley <gphemsley@gmail.com>
Date: Sat, 1 Jun 2013 20:25:20 -0400
Message-ID: <CAH4e3M6yDr1A4mwJz694bU9wtHHMjpW9_uJh18Z_noKzG1guYQ@mail.gmail.com>
To: Peter Occil <poccil14@gmail.com>, whatwg List <whatwg@whatwg.org>
(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.

On Sat, Jun 1, 2013 at 8:17 PM, Peter Occil <poccil14@gmail.com> wrote:
>> However, in order to test parameters, I have been
>> using 'charset' (because that's they only one I'm aware of that has a
>> Web-visible effect), and certain implementations may be sniffing
>> specifically for the string "charset=", which would cloud the results
>> of my testing.
>>
>
> There are other parameters that are significant in MIME types, such as
> "codecs",
> which is used in certain newer HTML5 APIs. For example, some very
> recent browsers support the canPlayType method of the <video> element,
> which takes a MIME type as a parameter (though it doesn't work well in OS X
> versions of
> Firefox 21, apparently [1]).  The parameters, especially the "codecs"
> parameter,
> can make a difference in what value is returned by the API.
>
> [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=875385
>



-- 
Gordon P. Hemsley
me@gphemsley.org
http://gphemsley.org/http://gphemsley.org/blog/
Received on Sunday, 2 June 2013 00:26:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:21 UTC