-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathm3u8_player.html
More file actions
41 lines (38 loc) · 1023 Bytes
/
m3u8_player.html
File metadata and controls
41 lines (38 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HLS modified by Techy Rakshak</title>
<link rel="stylesheet" href="https://cdn.plyr.io/1.8.2/plyr.css">
<style>
body {
width: 100%;
margin:0px;
padding:0px;
height:100%;
}
#player{
height:100%;
}
</style>
</head>
<body>
<video preload="none" id="player" poster="TECHYRAKSHAKTHUMBNAILURL" autoplay controls crossorigin></video>
<script src="https://cdn.plyr.io/1.8.2/plyr.js"></script>
<script src="https://cdn.jsdelivr.net/hls.js/latest/hls.js"></script>
<script>
(function () {
var video = document.querySelector('#player');
if (Hls.isSupported()) {
var hls = new Hls();
hls.loadSource('TECHYRAKSHAKVIDEOURL');
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
}
plyr.setup(video);
})();
</script>
</body>
</html>