A couple of months ago I had to work on a project that involved setting up a video streaming website using the Brightcove service.
On desktop browsers, the default player would use a Flash interface, falling back to HTML5 videos on mobile. My development tests were run on my Nexus phone and tablet. All went well until I got the results from my QA team: the videos were playing only on Nexus devices. All the other phones were outputting the following error: “The video you are trying to watch is currently unavailable. Please check back soon.”
I spent a lot of time investigating this. Brightcove support was very helpful, and answered all my tickets with insightful information. Unfortunately, the conclusion was that there’s nothing that can be done regarding HLS videos on Android versions prior to 4.3. The fact that the BBC Good Food website somehow got it working makes me think that there’s a magical combination of encoding settings that plays properly on mobile. I don’t know how they managed to make it work; the email I’d send them remained unanswered.
I’ve summed up the content of the Android playback tickets I’ve raised with Brightcove, into something that might be considered an answer:
Changing the rendition selection behaviour for Android is going to be quite involved.
If you wish, you could use a player plugin for the time being to force all 4.x versions of Android to play HLS. The code at the link below uses the API to update the loaded video to use its HLS URL if available. https://gist.github.com/anonymous/29e94d6992d9105c7600 If you choose to use this you will encounter problems with Android < 4.2 when playing HLS, which is why the player prefers MP4 to HLS. The most problematic are that you can't seek, and playback stops and you'll get an error when trying to switch to full screen. There's nothing we can do in the browser to workaround these unfortunately -- these are problems with the device's HLS support. There is no possibility of getting good playback on Android < 4.2 without Flash in the browser if you're using DRM. We can't improve Android's capability to play HLS in the browser, and there's no way to make an Android browser play DRM-encrypted MP4 renditions. Android can play the unencrypted MP4 renditions, but if DRM is a must, you could consider the option of using a native app. Our Android SDK can play Widevine-encrypted videos, and there will be a version available in the future that uses a custom library to play HLS to overcome the shortcomings of Android's native HLS playback (in the app).
If anyone has had this problem and has found the solution, please let me know. A lot of people saw my Stack Overflow issues I’d raised, and I constantly have to turn down paid consulting offers that involve implementing HTML5 videos on Android.