How to play any live streaming url in html

996 Views Asked by At

Im trying some live streaming url like m3u8 url in my blog site which is made by html. But Some streaming link have some more part then m3u8. Example: http://31.172.87.20:2200/EX/ptvsportshd-pa/tracks-v1a1/mono.m3u8?token=RED_Hqqv1c3nXjqlzBGFPhFuTg==,165803831455.4814651659=|User-agent=REDLINECLIENT

Here you can see a part after m3u8.

Also some link work on VLC Player & MX Player Or Any IPTV player but Don't work in chrome or html web pages.

Example: http://103.99.249.107:81/play/a02m

So my question is how can i play this link into my blogger web page. Im using this html & js code--

Js Code:

<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>

html code:

<video width="100%" height="100%" poster="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRjB3bOuf7_8FUI1wxGl4f-A3_C9LUpncH5FDp7N2uvXqNopsWb-XQj27o&s=10" controls>
<source src="http://103.199.161.254/Content/ddsports/Live/Channel(DDSPORTS)/index.m3u8" type="application/x-mpegURL">

Can anyone help me?? So that i can play every live stream in html web page? Which is working on iptv player?

Thanks in advance

1

There are 1 best solutions below

0
Mick On

The parts after the '?' in the URL are parameter that are being passed.

In the example above they seem to be related to authentication of the user or device and some info about the client type.

Many devices and browsers will also not stream HTTP, as opposed to HTTPS, streams by default.

You also need to make sure you have the rights to play the content.

For your blog example, DDSPORTS actually provide some of their livestream on YouTube so you can directly embed that if you are comfortable with the approach (use share button on YouTube and select embed).