Date: January 13, 2014 Author: Jeroen Wijering

Androids

We all know Android fragmentation is a big deal: tech journalists love to write about it. But how does this situation actually impact web video? In this post, we’ll check out some forks in the road and how to smooth video playback on Android.

Platform Versions

The biggest checkbox for rich video playback on Android is the platform version. Ice Cream Sandwich, released in October 2011, brought massive improvements to video, including:

  • Robust support for the HTML5 <video> element API.
  • Support for in-page playback of videos (instead of fullscreen only).
  • Support for the Apple HTTP Live Streaming protocol.

The prevalent older version of Android, Gingerbread, does not support in-page video playback or HLS streaming. It also has a buggy <video> API. Luckily, it is slowly fading away:

Android Versions Chart

Whether you’ll still want to support older Android versions depends upon your business model and user demographics. With JW Player, we do not attempt to support Android below 4.0 through full-fledged HTML5 playback. Instead, we use what we call our download fallback: a nicely formatted link to the video. When clicked, it uses the built-in media player to play the video.

Regardless of platform version, Android always supports MP4 video and AAC audio. Always use these formats to deliver content, since they currently work across any browser and device available today.

Mobile Browsers

Another interesting dimension is the browser. Contrary to iOS, where 98% of pageviews are generated through Safari, people are actually using multiple browsers on Android. Though not new (the same happens on Windows and Mac), this trend is unique for mobile and growing.

chart_browser_vs_android

As you can see from the chart, the Android OS market share is still growing. The usage share of the default Android browser is declining though. Instead, users increasingly rely on the following browsers:

Note that Firefox, a “usual suspect” on the desktop side, does not have any significant mobile market share. It’s still below 1%.

Though Google’s Chrome presents an interesting opportunity, at JW Player we do not yet leverage the browser’s unique features. This is partly because of market share and partly because there are alternatives: captions can be rendered with JavaScript, the WebKit fullscreen API still does its job, and Apple HLS provides streaming support.

For proxy browsers, we employ the same trick as for older Android devices: we draw a download fallback that triggers playback with the built-in media player. You should do the same on your site; a plain HTML5 <video> tag will not help these users.

jw_android_devices

Device Quirks

A third item to keep in mind when publishing video content to Android is that small media playback quirks exist on some devices. This is a result of such factors as GPU video decoding support  and Android OS tweaking by the various vendors. Some examples we’ve seen:

  • Inconsistent support for high quality H264 video. Officially, Android only supports H264 Baseline profile, but we’ve seen 360p H264 Main profile play on any phone since 2010. Any Android device released in 2013 seems to play 720p H264 High profile just fine too.
  • Some devices actually play more than advertised. For example, the HTC Desire plays HLS despite being on Android 2.3 and the Galaxy S2 plays FLV in HTML5 mode – that is, before the device gets upgraded from IceCreamSandwich to JellyBean.
  • Some vendors still install Adobe Flash on their Android devices. We recommend to not use Flash at all for video playback, since it’s still a bad user experience. Better to target HLS/HTML5 on devices that support it and use a download fallback for other devices.

Test, Test Test

Overall, our biggest recommendation is to just test, test, test. Try to find out which Android devices are popular with your audience and test your site extensively on them.

At JW Player, we use sources like this one to determine which devices to test on. We currently test on Samsung’s Galaxy S2/S3/S4 phones and Tab/Tab2 tablets, Google’s Nexus 4/5 phones and 7/10 tablets and HTC’s older Desire/Wildfire phones.

While it is a painful process, manual testing enables us to catch and bypass browser quirks, thereby providing our customers robust support for the Android platform.