-
Notifications
You must be signed in to change notification settings - Fork 523
/
block-bg.html
44 lines (40 loc) · 1.28 KB
/
block-bg.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Block background example</title>
<style>
html, body {
margin: 0;
}
</style>
</head>
<body>
<!-- Easy as hell -->
<div id="block" style="width: 100%; height: 500px;" data-vide-bg="video/ocean" data-vide-options="position: 0% 50%"></div>
<br><br>
<div id="block2" style="width: 100%; height: 500px;"
data-vide-bg="mp4: video/ocean, webm: video/ocean, ogv: http://vodkabears.github.io/vide/video/ocean, poster: video/ocean"
data-vide-options="position: 0% 50%">
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../libs/jquery/dist/jquery.min.js"><\/script>')</script>
<script src="../src/jquery.vide.js"></script>
<script>
// $(document).ready(function () {
// $('#block').vide('video/ocean'); // Non declarative initialization
//
// var instance = $('#block').data('vide'); // Get the instance
// var video = instance.getVideoObject(); // Get the video object
// instance.destroy(); // Destroy instance
//
// $('#block2').vide({
// 'mp4': 'video/ocean',
// 'webm': 'video/ocean',
// 'ogv': 'video/ocean',
// 'poster': 'video/ocean',
// });
// });
</script>
</body>
</html>