-
Notifications
You must be signed in to change notification settings - Fork 0
/
jiankong.html
69 lines (60 loc) · 1.58 KB
/
jiankong.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<title>监控信息</title>
<style>
body {
margin: 0;
}
#url {
width: 100%;
}
.btn-container {
margin: 10px;
}
#myPlayer {
max-width: 600px;
width: 100%;
}
</style>
<script src="ezuikit.js"></script>
<script src="jquery-3.5.1.min.js"></script>
</head>
<body>
<!-- ezopen://open.ys7.com/f01018a141094b7fa138b9d0b856507b[.hd].live.[rtmp|hls|ws|flv|m3u8] http://hls.open.ys7.com/openlive/f01018a141094b7fa138b9d0b856507b.hd.m3u8-->
<textarea id="url" placeholder="这里输入直播地址">https://hls01open.ys7.com/openlive/2e78ed17c1394e5b838ee20efc5dc376.hd.m3u8</textarea>
<div class="btn-container">
<button id="init">播放</button>
<button id="stop">结束</button>
</div>
<video
id="myPlayer"
autoplay
src=""
controls
playsInline
webkit-playsinline
>
</video>
<script>
$('#init').click(function () {
var url = $('#url').val().trim();
$('#myPlayer').attr("src", url);
var player = new EZUIKit.EZUIPlayer('myPlayer');
// 日志
player.on('log', log);
function log(str) {
var div = document.createElement('DIV');
div.innerHTML = (new Date()).Format('yyyy-MM-dd hh:mm:ss.S') + JSON.stringify(str);
document.body.appendChild(div);
}
$("#stop").click(function () {
player.stop();
})
});
</script>
</body>
</html>