News for hackers. Stuff that matters.
Re:HTMLMediaElement.canPlayType() by eyelidlessness on Sunday February 27, 2022 @01:12PM (#30490850)
The return values are definitely terrible, but the information I’m inferring is:

- Maybe: the mime type is likely a container, and there are a wide range of possible contained formats… some supported, some not. As in the example, mp4 is such a container.

- Probably: this is either a known format that’s definitely supported (boolean true) or a container format with a narrower range of contained formats, all of which are likely to be supported if any are. Newer or more obscure containers will more likely fall in this category.

I hate to imagine the bikeshedding that must have gone into this API.

Re:HTMLMediaElement.canPlayType() by lucideer on Sunday February 27, 2022 @01:18PM (#30490907)
> I hate to imagine the bikeshedding that must have gone into this API.

I can't imagine any comprehensively bikeshedded API that wouldn't result in a number being returned here. And it's in the HTML5 spec., which has a reputation for being dictatorially authored by a single individual.