forked from matthojo/videojs-Background
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
63 lines (60 loc) · 1.64 KB
/
example.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Video.js Fullscreen</title>
<link href="node_modules/video.js/dist/video-js.css" rel="stylesheet">
<style>
body {
position: relative;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.info {
background-color: #eee;
border: thin solid #333;
border-radius: 3px;
padding: 0 5px;
text-align: center;
opacity: 0.5;
}
.videojs-background-wrap {
overflow:hidden;
position:absolute;
height:100%;
width:100%;
top:0;
left:0;
z-index: -998;
}
</style>
</head>
<body>
<div class="info">
<p>
You can see the Video.js Background plugin in action below.
Look at the source of this page to see how to use it with your videos.
</p>
</div>
<video id="bg-video"
class="video-js vjs-default-skin"
style="position:absolute;top:0;left:0;overflow:hidden;z-index:-998;"
height="100%"
width="100%"
poster="http://video-js.zencoder.com/oceans-clip.png"
loop >
<p>
Your browser doesn't support video. Please <a href="http://browsehappy.com/">upgrade your browser</a> to see the example.
</p>
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">
</video>
<script src="node_modules/video.js/dist/video.js"></script>
<script src="lib/videojs-Background.js"></script>
<script>
// fire up the plugin
videojs('bg-video').Background();
</script>
</body>
</html>