Hls in html5 not working in android chrome browser

I get problems while playing videos in the Chrome Chrome Android Browser.

In this, I put the HTML5 tag and provide a link to m3u8 as the source of the video tag. But it does not play in the Chrome Browser.

But if I provide a link to the m3u8 file in the browser, than it plays the video in the Android video player.

So what needs to be done to play the video in the HTML5 tag?

Note. I checked this with Android 4.0.3 and 4.1

Thanking in Advance,

Sagar Joshi

+5
source share
2 answers

, , , , - , .

, h264.

0

hls , hls javascript, ,

<video id="my-video" style="width:640px height:480px;" controls>
                            <source src="{put your source link here}">
                        </video>
                    </div>
<script src="http://hlsbook.net/wp-content/examples/hls.min.js"></script>
<script>
  if ( Hls.isSupported() ) {
    var video = document.getElementById('my-video');
    var hls = new Hls();
    hls.loadSource('{put your source link here}');
    hls.attachMedia(video);
    hls.on(Hls.Events.MANIFEST_PARSED, function() {
      video.play();
    });
  }
</script>

, Android, ios-safari , ios-safari hls javascript, Safari mobile - , , hls.js. android script hls.loadSource, android chrome.

0

All Articles