-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathH5LiveFlv.html
50 lines (49 loc) · 1.56 KB
/
H5LiveFlv.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
<!DOCTYPE html>
<!--
时间:2016-06-22
描述: h5 播放flv 直播测试
-->
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
*{
padding: 0px;
margin: 0px;
}
html,body{
width: 100%;
height: 100%;
}
</style>
<script type="text/javascript" src="js/flvdemux.js" ></script>
<script type="text/javascript" src="js/mp4mux.js" ></script>
<script type="text/javascript" src="js/H5Live.js" ></script>
<!--<script type="text/javascript" src="js/flv2mp4.js" ></script>-->
<script>
// var elem;
window.onload = function() {
//如果flv是跨域的,用https://cors-anywhere.herokuapp.com/ 后面跟上你们的flv地址即可
// Live.init("https://cors-anywhere.herokuapp.com/http://dvr-ws.csslcloud.net/src/AE3C4B5BCABAA3AE9C33DC5901307461.flv","pchVideo")
};
function goPlay(){
Live.init(document.getElementById("srcUrl").value,"pchVideo");
}
</script>
</head>
<body>
<div style="width: 50%;height: 400px;margin: auto;background-color: black;">
<video id="pchVideo" style="width: 100%;height: 100%;" >
buzhichi
</video>
</div>
<div style="width: 30%;height: 50px;margin: auto;>
<div id="timeCurrent" style="float: left;"></div>
<div id="time" style="float: left;"></div>
<input style="width: 90%;" type="text" id="srcUrl" value="https://cors-anywhere.herokuapp.com/http://dvr-ws.csslcloud.net/src/AE3C4B5BCABAA3AE9C33DC5901307461.flv"/>
<button onclick="goPlay()">Play</button>
</div>
</body>
</html>