All posts tagged ‘iPhone’

File Under: CSS, Mobile

The iPhone Monoculture Is in Your Mind

Photo: Ariel Zambelich/

In the recent kerfuffle over the prevalence of the -webkit CSS prefix and the lack of corresponding prefixes for other browsers, we told you that the problem was with developers, not WebKit browsers. Instead of writing code that will work in any browser many developers are coding exclusively for WebKit and that’s a problem.

But mobile expert Peter-Paul Koch, better known in the web developer community as just PPK, argues that the real problem is not WebKit, nor is it even web developers’ fascination with WebKit. The real problem is the developer-created monoculture of the iPhone.

According to Koch, “web developers don’t care about WebKit…. They care about the iPhone.”

The interesting thing about Koch’s argument is that he doesn’t claim there is actually a monoculture of the iPhone on the web. In fact, he cites some of Mozilla’s web crawler stats which seem to say just the opposite. Instead Koch believes the problem is in our heads, so to speak.

“What we have here is an iPhone monoculture; not in the stats, but in web developers’ minds,” writes Koch. “This is the fundamental problem we must address.”

The cure, says Koch, is to diversify tutorials and examples. “Start talking about testing in mobile non-WebKit browsers (i.e., Opera),” he writes. “Start talking about other platforms besides iPhone (and Android). Start talking about mobile diversity, instead of showing the iPhone over and over and over again.” What do you do if the only phone you have to test on is the iPhone? Well, there are emulators available for most phones, including Opera’s very powerful mobile emulator which can simulate all kinds of phones and connections. And don’t forget that Opera Mini is available for the iPhone if you’d like to at least test your site in something other than Mobile Safari.

File Under: HTML5, Multimedia

Adobe Releases Its Own HTML5 Video Player

Adobe has released an embeddable video player that plays HTML5 native video in browsers that support it, and falls back to Flash in browsers that don’t.

It’s cross-browser and cross-platform, so it works on iPhones, iPads and other devices that don’t support Flash. Using Adobe’s new player, these devices can show videos in web pages without the Flash plug-in.

There are already several players out there that use the HTML5-with-Flash-fallback method, such as Vimeo’s new player and the slick one from Brightcove that can handle video ads. All of these players, like Adobe’s, are based on open web technologies and can be customized with CSS and JavaScript. But this newest one, being from Adobe, is sure to be a bigger deal.

The company has come under fire in the past year over concerns about the stability and performance issues related to its Flash Player browser plug-in, and Flash technology itself. Apple’s iPad ships without support for Flash, and Apple initially disallowed apps created in Flash from being sold in its app store. Apple rescinded after a few months, but the damage was already done — Google began pushing HTML5 video over Flash by releasing WebM, a new open video format, and developers got busy looking at HTML5 as a replacement for Flash, at least when it came to embedding videos.

With its new player, Adobe is responding to their developers’ wishes for solutions that play well on the open web. It comes on the heels of last week’s release from Adobe, which lets artists using Illustrator export their drawings as HTML5 Canvas, and its earlier pack of HTML5 tools for Dreamweaver.

HTML5 video adoption among browsers has gone tremendously so far — Chrome, Firefox, Safari and Opera all support native video, and baked-in support is coming to Internet Explorer 9 next year. But it’s still a bit of a mess, with different browsers supporting different formats. So developers posting HTML5 video still need to encode their files in at least two of the three major formats — the widely-used H.264, the newer WebM, or the older Ogg Theora — to guarantee all HTML5 capable browsers will be able to see their videos.

With the proper file formats in place, Adobe’s new player will play native web video in all the newest browsers, and will switch to Flash playback mode for all your poor visitors stuck with IE6 or something equally stone-aged.

The new HTML5 video player is incorporated into the workflow of Dreamweaver Creative Suite 5, so if you’re already using Adobe’s tools to build your site, you can drop in a player using Dreamweaver’s “Customize Widget” function.

If you’re not a Dreamweaver person, you can still generate all the code you need using Adobe’s free Widget Browser app. One caveat — the Widget Browser is an AIR app, so you’ll need to have Adobe’s Flash-based runtime to use it, though AIR apps will install AIR for you if you’re lacking.

To develop its video player widget, Adobe used open source code from Kaltura, repurposing a popular library that’s found at the heart of several HTML5 video players.

See also:

File Under: HTML5, Mobile

Video: Watch Flash Hand HTML5 a Beating on Mobiles

We’re not trying to throw gasoline on the fire or anything, but here’s an interesting video of Flash and HTML5 duking it out on two different mobile devices.

Developer Chris Black shows us two versions of the same animation, one done in Canvas and JavaScript and one done in Flash. He first runs it on a brand new iPod Touch (HTML5) and then on an Android Nexus One (HTML5 and Flash). The framerate is much higher and steady on the Flash version — 57 frames per second versus 40fps in Canvas on the Nexus One and 22fps on the iPod.

A few huge caveats here: The animation is very simple, and is hardly on par with most web animations. Also, the JavaScript code is not optimized as much as it could be, which may be hurting the framerate numbers in the HTML5 portion of the test. Lastly, it’s only an experiment. The HTML5 test measures the rendering speed of the mobile browsers being used, so it can’t be taken as a true head-to-head Flash/HTML5 benchmark. Read the comments on Black’s post and you’ll see people reporting different results across different Android devices. To that point, he uses an iPod Touch, roughly the same as an iPhone and not as fast as an iPad (none of which can play Flash content).

So what’s the purpose, then? Black says he’s trying to take the temperature of the different choices to decide where it makes the most sense for him to focus his efforts as a developer. Here’s his rationale, in the comments of his post:

Continue Reading “Video: Watch Flash Hand HTML5 a Beating on Mobiles” »

File Under: HTML5, Mobile, Web Apps

Yahoo Mail Switches to HTML5 on the iPad

Yahoo recently revamped its webmail site to deliver a richer, HTML5-powered experience to iPhone users, and now the company has done the same for iPad users.

Go to the Yahoo Mail website on your iPad and you’ll see the new, fully juiced-up HTML5 version instead of the older mobile version.

Yahoo mail the world’s largest webmail site — it has over 275 million users — but the site lags behind second-runner-up Gmail when it comes to innovation with HTML5 on the iPad and other touchy-swipey browsing devices.

Still, the new Yahoo Mail looks pretty slick. Scrollable photo previews now appear inside e-mail messages, and it supports offline local cache so you can keep working even when you’re out of range.

File Under: JavaScript, Mobile

iPhone ‘Pull To Refresh’ in JavaScript

When it first arrived in iPhone apps, the simple “pull to refresh” action was instantly hailed as a genius bit of user interaction engineering.

It’s an ultra-intuitive way of refreshing the displayed page content by simply pulling the page down with your thumb, then releasing it — sort of like pulling a lever on a slot machine. The official Foursquare and Twitter (nee Tweetie) apps use it, so if you’re into social networking, you’re already familiar. But so far, its use has been limited to native apps.

Now developer Wayne Pan has created the same behavior in JavaScript for use in web apps. It’s just a proof of concept implementation at this time, and he’s found some of the limitations.

Point your mobile browser at to test it. It’s a little jerky, but it does work. And his code doesn’t rely on any JavaScript libraries, so with a little tweaking, this behavior can be integrated into any web app and will work on Android and iOS devices. Nice work!

[Hat tip to Dion]

See Also: