What I am trying to achieve is doing live streaming via Android device. After testing, prior version 4.3, devices are playing live streamings using HLS .m3u8 properly. An example source code is as follow:
<video controls="controls" style="height:400px; width:320px;">
<source src="/hls-live/my-stream_/my-stream_,1360,500,.m3u8"></source>
</video>
<a href="/hls-live/my-stream_/my-stream_,1360,560,.m3u8">Direct Link<a/>
As you can see above, I'm trying to use HTML5 video tag to render the stream. It won't play in browser, however, if you click the direct link with the exact same path, a player will pop up and the stream will play correctly.
So I am a bit confused here as why the live can't be player properly under the html5 player, but able to play in a popup player (I assume the later is a native player under Android?)
Environment:
- Android OS 4.3
- ASUS Nexus 7
- Chrome browser
EDIT: Some more information added here,
I've also tried other type of video, for example http://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov/playlist.m3u8
from this page http://www.wowza.com/forums/showthread.php?32675-HLS-playback-issue-on-Android-4-3
. So replace this m3u8 with the one in <source>
tag and the Chrome browser will play it ok.
If looking into the working m3u8, you can see the codecs is avc1.66.30, mp4a.40.2
, which I suspect that the actual codec of the files is the cause of the issue.
I've also tried to call media.canPlayType('application/vnd.apple.mpegURL')
and it returns an empty string.