0

New in streaming m3u8 files.

Was working on webos tv based application.

Where can play m3u8 files, but came across some m3u8 files are playing but not all.

Here is one example ,

This is working code in html chrome browser:

<!-- CSS  -->
 <link href="https://vjs.zencdn.net/7.2.3/video-js.css" rel="stylesheet">
<!-- HTML -->
<video id='hls-example'  class="video-js vjs-default-skin" width="400" height="300" controls>
<source type="application/x-mpegURL" src="https://content.jwplatform.com/manifests/yp34SRmf.m3u8">
</video>
<!-- JS code -->
<!-- If you'd like to support IE8 (for Video.js versions prior to v7) -->
<script src="https://vjs.zencdn.net/ie8/ie8-version/videojs-ie8.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.14.1/videojs-contrib-hls.js"></script>
<script src="https://vjs.zencdn.net/7.2.3/video.js"></script>
<script>
var player = videojs('hls-example');
player.play();
</script>

And above code works fine, but when in above code src is changed with src="https://cshms3.airtel.tv/wh7f454c46tw4163224253_611767333/PLTV/88888888/224/3221225775/1.m3u8">

<!-- CSS  -->
 <link href="https://vjs.zencdn.net/7.2.3/video-js.css" rel="stylesheet">
<!-- HTML -->
<video id='hls-example'  class="video-js vjs-default-skin" width="400" height="300" controls>
<source type="application/x-mpegURL" src="https://cshms3.airtel.tv/wh7f454c46tw4163224253_611767333/PLTV/88888888/224/3221225775/1.m3u8">
</video>
<!-- JS code -->
<!-- If you'd like to support IE8 (for Video.js versions prior to v7) -->
<script src="https://vjs.zencdn.net/ie8/ie8-version/videojs-ie8.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.14.1/videojs-contrib-hls.js"></script>
<script src="https://vjs.zencdn.net/7.2.3/video.js"></script>
<script>
var player = videojs('hls-example');
player.play();
</script>

Getting below error showing m3u8 can have different codec support or security: ported. { "message": "Script error.", "filename": "", "lineno": 0, "colno": 0 } VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. { "code": 4, "message": "The media could not be loaded, either because the server or network failed or because the format is not supported.", "status": null, "MEDIA_ERR_CUSTOM": 0, "MEDIA_ERR_ABORTED": 1, "MEDIA_ERR_NETWORK": 2, "MEDIA_ERR_DECODE": 3, "MEDIA_ERR_SRC_NOT_SUPPORTED": 4, "MEDIA_ERR_ENCRYPTED": 5 }

If anyone can guide or help me in playing this m3u8 format: "https://cshms3.airtel.tv/wh7f454c46tw4163224253_611767333/PLTV/88888888/224/3221225775/1.m3u8"

A small code snippet will do, or any additional parameter or html5 player will do. thanks in advance.

0 Answers0