Live data from Hacker News

iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

docs.google.com

91–100 of 121 posts

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#91
post #49
post #32

Earlier quoted context omitted.

What's difficult about centering a box? Was that just sarcasm? A couple of approaches: Margin Auto w/ a fixed width Absolute 50% w/ negative margins Text-align center parent w/ inline-block display on children If it was sarcasm, disregard my stupidity.

That's still non-intuitive. Just do a search about centering (or X problem in CSS) and see the thousands of threads and questions and corner cases, hacks and exceptions. The whole thing feels like you are stretching something beyond what it was intended to be used for. Things like element positioning should be so so simple that if you search about it, you get nothing back because no one had a problem to ask for solut…

If that wasn't intuitive enough, feel free to email me and I'd be glad to teach/walk you through the many unfortunate ways to go about this: me@ryanglover.net.

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#92

Nice to see they're getting bit by their own decisions. They've gone out of their way to ensure that you can't ever play an Audio/Video clip automatically on page load in iOS Safari. Every new iOS release for the first few years included a patch to kill any new workarounds that let you do so. (Curse you iOS 4.3 for taking away our simulated clicks.) But now they have a use case of their own that needs it, so they inv…

Thing is, it's not a video. It's a glorified animated gif.

This has almost nothing to do with autoplay and the video tag and much more to do with a desire for a script-controllable animation.

(Most obviously: they don't start playing until the animation data is loaded, so that it doesn't do the herky-jerky frame-playing during load, like actual animated gifs.)

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#93

Earlier quoted context omitted.

Right. Now center it vertically. Also don't make any assumptions (like fixed height, or display: block) about container and the box to be centered.

http://cssdeck.com/labs/aqdw0l21/0 Container has fixed dimensions in my example, but it does not matter in this case.

removing them matters...

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#95

Earlier quoted context omitted.

There's nothing non-standards compliant about what they've done, as far as I can tell. Disabling the animation seems like an attempt at ensuring graceful degradation.

Graceful degradation shouldn't be based on user agent sniffing. That defeats the purpose.

I would argue that any reasonable technique that allows users of older browsers to access your site or use your app relatively normally is within the bounds of what we would describe as "graceful degradation." Being non-automatic doesn't make it any less valid.

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#96
post #90
post #78

Earlier quoted context omitted.

> Margin Auto w/ a fixed width Absolute 50% w/ negative margins Text-align center parent w/ inline-block display on children Yes, totally intuitive and logical solutions all of them. If you have w3c Stockholm syndrome, that is. E.g "Just absolute 50% it with a negative margin" (oh, yes, and you would have to know the width beforehand). > If it was sarcasm, disregard my stupidity. It's not the stupidity, is the willin…

It's not the stupidity, is the willingness to put up with BS convoluted inelegant workarounds for lack of basic, bread and butter, features. You're right, there is a willingness to put up with it. Mainly because I understand how these solutions work, how to debug them, and make everything nice and peachy. Do I wish things were better? Of course! Who wouldn't?

Well, we're in the same boat then.

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#97

Speaking of Apple website updates, I am surprised that they have never offered a responsive design for their apple.com site where you buy iPhones and iPads. Every app they make is designed differently for the phone or the iPad, but not the website.

Since they have an Apple Store App that works better than the website, why would they do that?

Well, the main reason is because apple.com has more than just a store. The Apple Store App doesn't have any info about unreleased stuff for instance.

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#99

As a side note, publishing this on Google Docs is an interesting choice by the author - alleviates any need to worry about load from the piece becoming popular, but it almost makes it an anonymous article.

I was going to use Blogger, but multi-login bit me. I had already written the draft in Docs, so I just published that. (I also like how plain published Google Docs look)

I went ahead and added a really short byline though.

Re: iPhone 5 web teardown: How Apple compresses video using JPEG, JSON, and canvas

#100
OK, so this would be one of those instances where I support a headline rewrite for clarification. The iPhone connection is incidental and I expected something entirely different.

This was more along the lines of, "How Apple reinvented/over-engineered the animated GIF"

Post reply on HN