Skip to content

Commit fbaab21

Browse files
author
李阳
committed
add video test
1 parent c8d6481 commit fbaab21

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

h5video/index.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>h5video</title>
7+
<style>
8+
.mainWrap {
9+
width: 400px;
10+
margin: 0 auto;
11+
text-align: center;
12+
}
13+
14+
.mainWrap video {
15+
width: 100%;
16+
}
17+
</style>
18+
</head>
19+
20+
<body>
21+
<div class="mainWrap">
22+
<video id="videoElement"></video>
23+
</div>
24+
</body>
25+
<script src="https://static.xingyan.panda.tv/b800da6964f4b8ec.js"></script>
26+
<script>
27+
if (flvjs.isSupported()) {
28+
var videoElement = document.getElementById('videoElement');
29+
var flvPlayer = flvjs.createPlayer({
30+
type: 'flv',
31+
url: 'http://flv-live-qn.xingyan.panda.tv/panda-xingyan/6fe48eada63a47d799f1ee5a5e85b62b.flv'
32+
});
33+
flvPlayer.attachMediaElement(videoElement);
34+
flvPlayer.load();
35+
flvPlayer.play();
36+
}
37+
</script>
38+
39+
</html>

0 commit comments

Comments
 (0)