Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media-source isTypeSupported test problems #1386

Open
cconcolato opened this issue Nov 14, 2014 · 2 comments
Open

media-source isTypeSupported test problems #1386

cconcolato opened this issue Nov 14, 2014 · 2 comments

Comments

@cconcolato
Copy link

I noticed the following problems with isTypeSupported tests. Don't know if/how to report that using Critic.

"Test invalid MIME format"
https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html#L23-L33

  • I don't understand why this subtest uses "webm" as MIME sub-type. The tests should be (or at least include subtests that are) independent of the byte stream format to demonstrate how the method works. It could work on an hypothetical video/x-my-video format.
  • the test misses testing syntactical valid values that are clearly unsupported such as video/x-my-video or audio/x-my-audio, or text/plain or application/octet-stream ...

"Test invalid mismatch between major type and codec ID"
https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html#L35-L38
The term "codec ID" should be replaced by "codecs parameter".
The notion of "mismatch" is not defined in the spec. This is related to the MIME types of the associated segment formats. It's not really up to MSE to test that. If we wanted to test that, there are many more tests to be added: for instance, it misses text tracks and associated mismatch. I suggest removing this subtest.

"Test invalid mismatch between minor type and codec ID"
Same remark for "codec ID" and the definition of "mismatch".
There are people working on the carriage of opus in mp4 so the notion of mismatch is moving. Similarly, 'audio/mp4;codecs="vorbis"' might be valid in the future. The question is why test such mismatch? The MIME type is not invalid. It may not be supported by an implementation but that's not a spec test. I suggest removing this subtest.

"Test invalid codec ID"
Same remark as above for the term "codec ID"
But this subtest is more a test for the ISOBMFF byte stream specification than for MSE. We could move them to a is-type-supported-isobmff.html test.
A side question is: how can a Web app test for a class of codecs, such as all "avc1" configurations.

"Test valid MP4 type"
Again these subtests are more related to the testing of the ISOBMFF spec than the MSE spec. There are many more codecs value that could be tested: "wvtt" for WebVTT in MP4, "stpp" for XML subtitles, "tx3g" for 3GPP timed text, ... and all formats defined at http://www.mp4ra.org/codecs

Also these tests don't test:

  • call with more than 2 values in codecs: all unsupported, all but one supported, audio+video+text, ...
  • call with a null argument (throws an exception)
  • call with no argument (throws an exception)
  • call with type is empty string (returns false)

I can prepare a PR with the agreeable changes if needed.

@Ms2ger
Copy link
Contributor

Ms2ger commented Nov 15, 2014

Please do.

@wolenetz
Copy link
Member

See #1405 (comment)
Some improvements (like invalid types for any browser) would still be ok for V1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants