Commit 1f2b48fc authored by hark's avatar hark

play

parent abac1ad4
Pipeline #1233 canceled with stage
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hls player</title>
<script src="hls.js"></script>
<script type="text/javascript">
debug = 0;
</script>
</head>
<body>
<div id="videobox">
<video width=30% height=30% id="video1" controls ></video>
<video width=30% height=30% id="video2" controls ></video>
<script>
function hls (url, elem) {
var video = document.getElementById(elem);
if(Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(url);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
}
}
hls('https://hlsdev.laglab.org:8443/hls/stream/leftover/index.m3u8','video1');
hls('https://hlsdev.laglab.org:8443/hls/stream/testje/index.m3u8','video2');
</script>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hls player</title>
<script src="hls.js"></script>
<script type="text/javascript">
debug = 0;
</script>
</head>
<body>
<div id="videobox">
<video width=30% height=30% id="video1" controls ></video>
<video width=30% height=30% id="video2" controls ></video>
<script>
function hls (url, elem) {
var video = document.getElementById(elem);
if(Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(url);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
}
}
hls('https://hlsorigindev.laglab.org/hls/stream/leftover/index.m3u8','video1');
hls('https://hlsorigindev.laglab.org/hls/stream/testje/index.m3u8','video2');
</script>
</div>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment