Android Fragmentation 101 for Video Publishers
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.
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:
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.
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.
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:
- Google’s Chrome for Android. This is the default browser on Nexus devices and aggressively pushed by Google on newer Android versions. Chrome is auto-updated and supports shiny new features like WebVTT captions, the W3C FullScreen API and Streaming Media Extension.
- Proxy browsers like Opera Mini and UC Browser. They render web pages server-side, reducing mobile data usage and costs. These browsers are very popular in developing countries, but do not support HTML5 video.
Note that Firefox, a “usual suspect” on the desktop side, does not have any significant mobile market share. It’s still below 1%.
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.
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.