-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
34 lines (29 loc) · 803 Bytes
/
index.html
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
<script src="/node_modules/pro-flv.js/dist/flv.min.js"></script>
<video id="videoElement" class="videoElement" muted controls></video>
<script>
if (flvjs.isSupported()) {
var videoElement = document.getElementById('videoElement');
var flvPlayer = flvjs.createPlayer({
type: 'flv',
url: 'ws://'+location.hostname+':8000/live/ATEM.flv'
},{
isLive:true,
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play().then(() => {});
}
</script>
<style>
.videoelement{
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
margin:0;
width: 100%;
height: 100%;
background-color: black;
}
</style>