Hacker News new | ask | show | jobs
by thrdbndndn 871 days ago
To incorporate something currently is only available in "native" program form is what I am thinking; like ffmpeg example above.
4 comments

I think most web pages do not need such features. WebAssembly has seen lots of adoption on the websites that do, like Figma and Photoshop for design, Zoom and Meet for interactive video, Unity for games, etc. etc. But most web pages are just text, and that's fine.

Wasm was never intended to be used on every web page, just like the Video element wasn't.

Yes, but WASM does not solve a problém which (many) people have. Of course there are some applications, like online image or video editors.
Which could have been done with WebAudio and WebGL/WebGPU as well, without the pain of dealing with WebAssembly tooling.
Surely you mean WebCodecs rather than WebGL/WebGPU? AFAIK no encoding primitives are exposed by WebGL/WebGPU.

The advantage of shipping an encoder in WebAssembly for is that you don’t have to rely on the browser supporting the specific codec you want. e.g. Safari and Firefox don’t yet support WebCodecs at all, but do support WebAssembly.

I really mean WebGL/WebGPU and using shaders instead of C and C++, while being GPU accelerated.

For a small taste,

"Meet Leon - superfast GPU-accelerated (WebGL) mpeg1-like video decoder in JavaScript"

https://www.easy-bits.com/mpeg1video-decoder-webgl-gpu

See mpeg1video-decoder-webgl.js on developer tools.

Oh interesting! I found this as well: https://jsmpeg.com/

I didn’t realize enough of the work in decoding mpeg was paralellizable enough to do on the GPU, let alone in the constrained world of WebGL, but apparently it is.

Do you mean those features added to WebAudio or that you could use WebAudio to implement those features, because the latter is not really true
it's maybe negligible compared to the code-size bloat of web applications, but delivering large libraries over the network with only limited caching is less than ideal