Live data from Hacker News

Prime Video Uses WebAssembly

amazon.science

61–70 of 254 posts

Re: Prime Video Uses WebAssembly

#61
post #51

Earlier quoted context omitted.

" But why , though?" I keep asking myself, from a "how many darn buttons and doodads does it really need to have?" perspective. I suspect the issue is that people write entirely too much dang code to solve what is, after all, a fairly simple UI problem [1]. I mean, seriously. The Alto had less than a megabyte of RAM and managed to invent the GUI--menus, mouse, all. How have we managed to make this harder in 40 years?…

Because it's not just buttons and doodads, it's all the error handling and loading indicators and UI edge cases that are needed to make it seamless and good. Title too long? Does it get truncated or shrunk? Does the UI reverse itself for RTL languages? Does the focus ring move in a sensible order? This is front end engineering. It's a whole profession, and when it's done poorly, folks think your software is garbage.…

Frontend engineering is a thing because of the accidental complexity of a massive software stack that's evolved by accretion and gone through fad after fad after fad. I'm not looking down on frontend engineers, but I don't believe right-to-left languages or focus order inevitably leads to hundreds of thousands of lines of code or 50+ MB binaries.

Re: Prime Video Uses WebAssembly

#62

Earlier quoted context omitted.

A company that makes an awful lot of money can afford to not make an awful app on major platforms. A native app on Windows, macOS, iOS and Android (TV), and some other solution for other platforms, isn't an unreasonable ask in this context.

It takes an awful lot more money to ask engineers to do boring things like, “reciprocate this behaviour from iOS to Android “

Once I broached this subject with a developer at a start-up that developed totally separate native apps for iOS and Android. I queried him about the use of native apps, and he made the point that you do whatever it takes to keep your users happy.

This was a startup. Not a billion dollar company. When your app is used by millions, it's a worthwhile investment.

It's also hardly boring to achieve the same end result on multiple platforms by using appropriate native code for each. Particularly when it produces satisfyingly fluid and responsive end results. Perhaps an engineer that considers it boring is in the wrong field. A UI developer should get satisfaction from developing UIs, not as it being a stepping stone to get into systems development. I can't think of anything more boring in app development than developing an app which operates in a mediocre way.

A carefully planned native app for each platform can still share parts of the same codebase, you're not necessarily reinventing the wheel each time.

Re: Prime Video Uses WebAssembly

#63
post #52

The egui framework they mention is pretty neat: https://emilk.github.io/egui/ It an entirely custom toolkit, so don't expect it to have a native look and feel, but it's a GPU-first design with multiple back-ends. It can be used in native OpenGL apps too. It's an immediate-mode UI, so it's very easy to build and update even complex windows. Great choice if you want to prototype a game.

Checked demo. Bugs when interacting. For example when clicking buttons on top does not switch to supposed part. just flushes screen momentarily. Clicking refresh on browser right after that fixes the situation.

Major pita is keyboard handling when selecting, cutting, pasting text in edit controls and markup editor

Re: Prime Video Uses WebAssembly

#65

Earlier quoted context omitted.

doom9 has a lot of good discussion.

I remember back in the day when doom9 was blocked at the corp firewall level because it had posts on how to circumvent things. Nevermind it was the unofficial support for things like AVISynth, x264, etc. Even the nascent days of ffmpeg were there. It took a lot of cajoling and back and forth with legal depts, but eventually, was allowed to be granted access on an individual basis I owe a lot of what was accomplished…

>For the person up thread talking about learning things, I wish I was in that position today with them rather than 20 odd years ago where everyone was in the dark

Where would you start today?

And what was being circumvented? Copyright protection?

Re: Prime Video Uses WebAssembly

#66

Personally, to me , whenever I read these stories about how Amazon is doing this novel use of WebAssembly, or how Uber is doing ludicrous engineering effort to keep their React-based app under 300MB for the App Store, I can't help but think: "Man, that's an awful lot of work to avoid writing a native app."

I hope native apps die. Most companies won't put in the level of effort into their engineering that the Chrome/Firefox teams do - specifically, they're not going to take security as seriously.

Re: Prime Video Uses WebAssembly

#67
post #49

Earlier quoted context omitted.

I have an LG UHD TV model from 2020 running webOS and I haven't noticed any performance issues either with Prime Video, UHD, HDR or otherwise. I use Bluetooth speakers/earphones for audio. The sound is almost perfectly synced with the video in Prime while there is a noticeably annoying delay in the Netflix app on the same TV.

To be clear, my beef is with the browsing UI, not the playback. The playback on all these devices is handled by dedicated hardware. It's not like Amazon's app is decoding videos in a WASM VM.

Well, X-Ray is a feature in the Prime app that I like and use quite often and is very snappy. Since it's part of the UI overlay, I think it's handled by the WASM module (probably with local caching) and not by the dedicated video-decoding hardware in the TV.

I agree that the browsing UI can sometimes take an extra second or two to refresh which I don't find to be a dealbreaker since it's the video/audio playback that I care about the most.

Re: Prime Video Uses WebAssembly

#68
post #12

Prime video has unbelievably bad performance on LG WebOS, and it’s not the platform because Hulu, Netflix, Disney, YouTube are all fine. If this is new and makes their app work acceptably, then great! Just checked and Prime using 90MB in my TV, while YouTube uses 214KB, so maybe I already have the wasm monstrosity.

While app the performance is just poor on my 2019 LG OLED TV I find HDR content to be unwatchable on it, seemingly a long running problem across multiple platforms: https://www.amazonforum.com/s/question/0D54P00007HLPkoSAH/le... HDR content is somewhat better when played through the Prime Video PS5 app, though it still seems much darker than HDR content played on the Netflix/AppleTV/HBO LGTV apps.

Oh man I'm kind of happy to know that other people have this HDR problem too. Why don't apps and TVs just provide a simple toggle to turn it off? Why must it be automatic and non user selectable? Just give me the normal color stream!

Re: Prime Video Uses WebAssembly

#69

Language success is in large parts driven by what system adopts that language. Objective-C’s success was driven by iOS. C’s success was driven by Unix. C++’s early success was driven in large part by 90’s GUI frameworks ( MDC, OWL, Qt, etc. I think Wasm is shaping up to be huge in that you can safely run, high performance code across multiple operating systems/CPU’s. Of all the languages, I think Rust has the best WA…

> I think Rust has the best WASM Nope, C/C++ has, emscripten remains undefeated You don't just put a name and expect things to skyroket C++/Go/C# has more chance to become the standard toolkit for WASM than rust rust problem, is people promotes more the "rust"™ rather than their project, the crabs definitely shadows them, it's unfortunate

Your comment seems to rooted in your dislike of Rust, rather than provide any technical arguments.

The Rust tooling certainly was the best, no question. As the Mozilla WASM devs have moved on the WASM tooling has stagnated, sadly, and The C++ tooling has caught up.

Languages like C# and Go are inherently worse for WASM because they require GC and have big runtimes they have to bring along.

Re: Prime Video Uses WebAssembly

#70
post #52

The egui framework they mention is pretty neat: https://emilk.github.io/egui/ It an entirely custom toolkit, so don't expect it to have a native look and feel, but it's a GPU-first design with multiple back-ends. It can be used in native OpenGL apps too. It's an immediate-mode UI, so it's very easy to build and update even complex windows. Great choice if you want to prototype a game.

Immediate mode is such an outdated approach for a modern UI framework. It's a deal-breaker imo.
Post reply on HN