w3c / media-source

Media Source Extensions
https://w3c.github.io/media-source/
Other
268 stars 58 forks source link

Consider restricting isTypeSupported to fail if unexpected parameter is included #247

Closed wolenetz closed 4 years ago

wolenetz commented 4 years ago

Example: "webm/audio;codecs=opus;test='6'": Should isTypeSupported() return true for this on an implementation that supports opus in WebM with MSE? Or should the extra parameter/value ";test='6'" cause failure? The bytestream format specs, especially ISOBMFF, refer to various RFCs that allow other parameters (like profile) and codec encodings (like rfc2231), though implementations tend to ignore unrecognized parameters today. Should they fail instead in vNext?

dongheunkang commented 4 years ago

Firefox ignores unrecognized parameters. So treat it as true for the above case.

Personal opinion, but I think firefox's implementation is correct. Because isTypeSupported's type paramter use MIME Type.

guest271314 commented 4 years ago

Firefox ignores unrecognized parameters. So treat it as true for the above case.

Personal opinion, but I think firefox's implementation is correct. Because isTypeSupported's type paramter use MIME Type.

Interestingly at Firefox 72 and Nightly 74 when MIME type is set to "audio/webm;codecs=opus" and the actual codec is Vorbis the media still plays. Chromium 81 does not play "audio/webm;codecs=opus" at all.

guest271314 commented 4 years ago

https://github.com/web-platform-tests/wpt/issues/21240

wolenetz commented 4 years ago

It seems we should continue to support unexpected parameters here. Closing.