Live data from Hacker News

Prime Video Uses WebAssembly

amazon.science

141–150 of 254 posts

Re: Prime Video Uses WebAssembly

#141

> Prime Video > xyz [4K/UHD] 4K is not available when using a computer > HD is not available because you're not using Windows when using Windows > HD is not available because you don't have HDCP Graphics driver begs to differ. Prime SD is usually somewhere between 240p and 320p, HD looks like a decently encoded 720p file. Never seen it but I'm guessing 4K might actually approach the quality of a 2007 Blu-Ray.

I saw these errors the one time I tried Prime Video and laughed out loud, and ended the trial on the spot. It was like being turned away by a bouncer from a awful looking bar because they didn't like your shoes. Thus ends our relationship!

Re: Prime Video Uses WebAssembly

#142
post #137

Prime Video app sucks. Spend less time over-optimizing, more time improving usability.

I cannot believe how Amazon is one of the biggest company on the planet and still cannot seem to figure out UI/UX for any of their product. Amazon (the website) having an awful UX might be "by design" (i.e dark patterns) but it make no sense for Amazon Video, AWS dashboard, the kindle/device side of the Amazon website, ...

Do they even employ UI/UX designers? AWS dashboard doesn't look designed to me.

Re: Prime Video Uses WebAssembly

#144

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."

Uber is a bad example because they need to have support for literally every payment method on the planet. And all of that needs to be preloaded ahead of time just in case the user decides they're going to fly to Mumbai tomorrow. Their app absolutely needs to be bloated or it won't work at all. Likewise, Amazon needs to run on all sorts of different smart TV platforms, not just iOS and Android. All of those apps need…

> Uber is a bad example because they need to have support for literally every payment method on the planet.

How is the breadth of their payment back-end and excuse for a bloated client?

Re: Prime Video Uses WebAssembly

#145
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.

The biggest downside of this is that everything is painted as "graphics", and you can no longer use the web inspector to modify the fonts, colours, etc. While few people (like myself) do this directly, lots of people use it indirectly through extensions like Adblock, Stylus, etc. For example, I find the fonts hard to read due to the colour choices; then I zoom in and it's better, but now this "Widget gallery" no long…

Yes, I really hope this doesn't become common. By not utilising the DOM, you're killing accessibility, autofill, customization (things like reader mode, automatic dark themes...)... These are things that regular people rely on every day (not just us techies writing userscript a and Stylus themes).

Re: Prime Video Uses WebAssembly

#146

Earlier quoted context omitted.

> 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.

I can dislike Rust too, but the facts are facts. Emscripten is the leader of WASM world and lot of its code is based on C++.

Re: Prime Video Uses WebAssembly

#147
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.

someone made a tutorial to make a web app in rust with egui https://www.youtube.com/watch?v=4MKcqR9z8AU

Re: Prime Video Uses WebAssembly

#148

> Prime Video > xyz [4K/UHD] 4K is not available when using a computer > HD is not available because you're not using Windows when using Windows > HD is not available because you don't have HDCP Graphics driver begs to differ. Prime SD is usually somewhere between 240p and 320p, HD looks like a decently encoded 720p file. Never seen it but I'm guessing 4K might actually approach the quality of a 2007 Blu-Ray.

Prime 4K's bit-rate is ~15Mb/s. A UHD Blu-Ray has a bit-rate that's more like 70Mb/s, and a 1080p Blu-ray has a bit-rate of ~28Mb/s. Of course, 4K is usually encoded with H.265 while 1080p is encoded with H.264, so the raw bit-rate numbers are not as useful for comparison - but still, that's almost twice the bit-rate for a quarter of the pixels, and H.265 isn't magic.

Re: Prime Video Uses WebAssembly

#149

Earlier quoted context omitted.

Where do you think all that code lives, then? The support for dark mode, the ability to look at the pixel data of an image so that you can display text with the right color on top of it to have high enough contrast, the subtle animation when you tab between elements in a scrollable grid, the annotations for accessibility, the code that makes drag and drop work like you expect... As much as you don't think it is "hund…

Hey, I share your passion for human interfaces - huge kudos to you. I built the main interface for the redesigned Amazon Photos iOS app and went through a lot of the things you mentioned - totally agree that it pays off. If you ever want to chat over coffee my email is johnanthony.dev@gmail.com

I share that passion too! Most people grossly underestimate how difficult it is to implement something as seemingly simple as a text field or menu, when there are so many hidden issues and techniques that make them easy to use because you don't notice all the support you're getting.

Well implemented user interfaces have polish that makes their inherent complexity invisible, but polish is actually millions of tiny little scratches, not just a clean simple perfectly flat surface.

Accessibility and internationalization are two crucial dimensions that most people forget about (especially non-sensory/motor-impaired Americans), which each add huge amounts of unavoidable complexity to text fields and the rest of the widget set.

Then there's text selection, character/word/paragraph level selection, drag-n-drop, pending delete, scrolling, scrollbar hiding, auto scroll, focus management, keyboard navigation and shortcuts, copy and paste, alternative input methods, type-ahead, etc, all which need to perfectly dovetail together (like auto-scrolling working correctly during selection and drag-n-drop, auto-scrolling triggering on a reasonably scaled timer regardless of mouse position instead of mouse movements only inside the text field, so scrolling is deterministically controllable and happens at a reasonable speed, and doesn't freeze when you stop moving the mouse or move it too far, etc).

There are so many half-assed custom text fields out there written by well intentioned people who just didn't realize the native text fields supported all those features, or weren't intimately familiar with all of the nuances and tweaks that have been hashed out over the decades (like anchoring and extending the selection, controlling and editing the selection with the keyboard, inserting and removing redundant spaces at the seams of the beginning and the end of the selection when you drag and drop text, etc).

Even when somebody achieves the straightforward task of implementing a text field that looks pixel-for-pixel equivalent to a native text field, they're usually making a promise that they can't keep, that it also operates exactly the same as a native text field.

I've seen many text fields in games (and browsers) that break type-ahead by dropping keyboard input when you type too fast, because instead of tracking device events in a queue, they're polling the current state of the keys each frame update, so when you get slow frames and stuttering (which is often, like during auto save or browser thrashing), they miss key transitions.

Most games poll the mouse buttons and positions this way too, so they break mouse-ahead by dropping mouse clicks if you make them too fast, and they perform actions at the current position of the mouse instead of its position when the click happened.

Even a beautifully designed well implemented AAA quality game like Dyson Sphere Project running on a high-end PC has this problem. After you place a power pole, you have to hold the mouse still for a moment to let the game handle the mouse down event and draw the screen a few times, before daring to move your mouse away from where you want to place the pole, otherwise the pole goes into the wrong position, away from where you clicked the mouse, and this really throws a monkey wrench into smooth fluid interaction, predictable reliability, mouse-ahead, etc.

The Xerox Star had a wonderfully well thought out and implemented text editor, which pioneered solutions to many of these issues in 1982 (including internationalization), demonstrated in this video:

Xerox Star User Interface (1982) 2 of 2

https://www.youtube.com/watch?v=ODZBL80JPqw

See Brad Myers video "All the Widgets (Fixed v2) - 1990". This was made in 1990, sponsored by the ACM CHI 1990 conference, to tell the history of widgets up until then. Previously published as: Brad A. Myers. All the Widgets. 2 hour, 15 min videotape. Technical Video Program of the SIGCHI'90 conference, Seattle, WA. April 1-4, 1990. SIGGRAPH Video Review, Issue 57. ISBN 0-89791-930-0.

https://www.youtube.com/watch?v=9qtd8Hc90Hw

Also by Brad Myers:

Taxonomies of Visual Programming (1990) [pdf] (cmu.edu)

https://news.ycombinator.com/item?id=26057530

https://www.cs.cmu.edu/~bam/papers/VLtax2-jvlc-1990.pdf

Updated version:

http://www.cs.cmu.edu/~bam/papers/chi86vltax.pdf

Brad Myers is finishing a book (tentatively titled “Pick, Click, Flick! The Story of Interaction Techniques”) which is partially a history of Interaction Techniques. Probably more than 450 pages. The initial chapter list can be seen at www.ixtbook.com. It is based on Brad’s All The Widgets video and Brief History of HCI paper, and also on his class on Interaction Techniques which he taught three times. As part of that class, Brad interviewed 15 inventors of different interaction techniques, all but one of whose video is available on-line, which also might be a useful resource.

Pick, Click, Flick! The Story of Interaction Techniques:

http://www.ixtbook.com/

https://www.cs.cmu.edu/~bam/ixtbook/#abstract

Brad Myers' Interaction Design Class:

https://www.cs.cmu.edu/~bam/uicourse/05440inter/

Here's the video and slides of the talk I gave to Brad's Interaction Techniques class about pie menus -- there's a discussion of mouse ahead, event handling, and polling around 16:30:

Video:

https://scs.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=...

Slides:

https://docs.google.com/presentation/d/1R9s4EEAwUjI_7A8GgdLY...

Pie Menus: A 30 Year Retrospective (Timeline):

https://medium.com/@donhopkins/pie-menus-936fed383ff1

Re: Prime Video Uses WebAssembly

#150
post #96

Earlier quoted context omitted.

What about all the older CPUs and GPUs out there that don't have hardware support for AV1?

Or even new ones, like the AMD Radeon RX 6500 XT that had the AV1 decoder chopped off the Navi die for some inexplicable reason.

The reason is because it's harvested from a laptop chip; and in laptops, the Ryzen 5000 media engine features AV1 decode, so it's wasted die space.

Still, the 6500 XT is an awful GPU.

Post reply on HN