3 ms·
> if WebAssembly really works well, why are efforts like WebCodecs needed at all? The answer is pretty straightforward. https://developer.mozilla.org/en-US/do
by esperent 4y ago
> if WebAssembly really works well, why are efforts like WebCodecs needed at all?
The answer is pretty straightforward.
https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_A...
> Many Web APIs use media codecs internally. For example, the Web Audio API, and the WebRTC API. However these APIs do not allow developers to work with individual frames of a video stream and unmixed chunks of encoded audio or video.
> Web developers have typically used WebAssembly in order to get around this limitation, and to work with media codecs in the browser. However, this requires additional bandwidth to download codecs that already exist in the browser, reducing performance and power efficiency, and adding additional development overhead.
- mike_hearn 4y agoThe codecs in WebCodecs also requires bandwidth to download. So they could do this by moving codec support out of the existing APIs, with an auto-fallback to a default WebAssembly module if you don't specify one when instantiating the API, thus de-privileging the renderer code and keeping things size equal whilst still allowing lower level API access. That's kind of my point: they don't seem to act in a way that suggests WebAssembly is a way to implement features with competitive performance and overhead.