[whatwg] [mimesniff] Review request: Parsing a MIME type
Gordon P. Hemsley
gphemsley at gmail.com
Sat Jun 1 17:25:20 PDT 2013
(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 at 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 at gphemsley.org
http://gphemsley.org/ • http://gphemsley.org/blog/
More information about the whatwg
mailing list