0% found this document useful (0 votes)
382 views1 page

JFT

This document contains code to embed a live cricket video stream on a web page. It makes an AJAX request to retrieve the live stream URL from a backend API and then sets the source of a <video> element to that URL. It also sets properties like autoplay, controls, muting and a poster image for the embedded video player.

Uploaded by

Goraya Saab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
382 views1 page

JFT

This document contains code to embed a live cricket video stream on a web page. It makes an AJAX request to retrieve the live stream URL from a backend API and then sets the source of a <video> element to that URL. It also sets properties like autoplay, controls, muting and a poster image for the embedded video player.

Uploaded by

Goraya Saab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<!

DOCTYPE html>
<html>
<head>
<title></title>
<title></title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-
CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">

</script>
<style>
body{padding:0;
Margin:0;}

</style>
<video controls=""id="plr" width="100%" height="200" poster="" autoplay muted
loop></video>
<source src=""type="video/m3u8">
<script type="text/javascript">

$(document).ready(function(){

$.ajax({

url: 'https://cdn2.mjunoon.tv:9191/v2/embed-player-url',

type: 'post',

data: {

slug:{'slug':'8xm-live'}

},

success: function(result) {

var str =result.data.live_stream_url.replace(/cdn6|cdn7|cdn4/g, "cdn5");


var src =result.data.live_stream_url.replace(/8XM-131/g, "cricket-live-
3");
console.log(src);
console.log(src);
var vid=document.getElementById("plr");
vid.poster = ('https://i.postimg.cc/qvXtXXkK/IMG-20210830-
WA0004.jpg');
vid.src = src;
vid.autoplay = true;
vid.controls = true;
vid.muted = false;
}
})
});
</script>
</body>
</html>

You might also like