forked from sydlawrence/jquery.videoBG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
210 lines (176 loc) · 6.06 KB
/
index.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<title>Make an HTML5 video a background</title>
<link rel="stylesheet" href="assets/framework.css"/>
<link rel="stylesheet" href="assets/style.css"/>
<script type="text/javascript" src="assets/jquery-1.5.1.js"></script>
<script type="text/javascript" src="jquery.videoBG.js"></script>
<script type="text/javascript" src="assets/script.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7654450-4']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="wrapper">
<div id="header">
<h1><a href="http://www.pledgie.com/campaigns/14895" id="donate_now" style="float:right">Buy me a beer</a>
jquery.videoBG plugin</h1>
</div>
<div id="main">
<ul id="nav">
<li><a href="#about">About</a></li>
<li><a href="#documentation">Documentation</a></li>
<li><a href="#demos">Demos</a></li>
<li><a href="https://github.com/sydlawrence/jquery.videoBG">Download</a></li>
<li><a href="#donate">Donate a beer</a></li>
</ul>
<div id="about" class="tab">
<a style="float:right" href="http://www.w3.org/html/logo/">
<img src="http://www.w3.org/html/logo/badge/html5-badge-h-multimedia.png" width="133" height="64" alt="HTML5 Powered with Multimedia" title="HTML5 Powered with Multimedia">
</a>
<h2>About</h2>
<p>This jQuery plugin enables you to very easily use an HTML5 video as a background to a website or any div.</p>
<p>For browsers that don't support the HTML5 video tag, it just uses an image.</p>
<div class="alert">
<h3>Warning</h3>
<p>Don't abuse this code... Don't use it too often, too many video instances will slow down the browser.</p>
<p>Please bear in mind bandwidth usage for both you, and your visitors</p>
</div>
<h3>Browser Support</h3>
<table>
<thead>
<tr>
<th width=300></th>
<th width=100>Video</th>
<th width=100>Image</th>
</tr>
</thead>
<tbody>
<tr>
<td><b>Firefox 4 (the best experience)</b></td>
<td class="success">Yes (webm)</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Internet Explorer 9</b></td>
<td class="success">Yes (mp4)</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Firefox 3.5</b></td>
<td class="success">Yes (ogv)</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Chrome</b></td>
<td class="success">Yes (webm/mp4)</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Safari</b></td>
<td class="success">Yes (mp4)</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Opera 10.5+</b></td>
<td class="success">Yes (ogv)</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Internet Explorer 8</b></td>
<td class="error">No</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Internet Explorer 7</b></td>
<td class="error">No</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Android Browser</b></td>
<td class="error">No</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Mobile Safari</b></td>
<td colspan="2" class="info">Does not modify default behaviour</td>
</tr>
<tr>
<td><b>Older Browsers that support position:fixed</b></td>
<td class="error">No</td>
<td class="success">Yes</td>
</tr>
<tr>
<td><b>Archaic browsers</b></td>
<td colspan="2" class="info">Does not modify default behaviour</td>
</tr>
</tbody>
</table>
</div>
<div id="documentation" class="tab">
<h2>Documentation</h2>
<p>
<code>$(el).videoBG(options);</code>
</p>
<h3><code>options</code></h3>
<dl>
<dt>mp4</dt>
<dd><i>required.</i> this is the src for the video</dd>
<dt>ogv</dt>
<dd><i>required.</i> this is the src for the video</dd>
<dt>webm</dt>
<dd><i>required.</i> this is the src for the video</dd>
<dt>poster</dt>
<dd><i>required.</i> this is the src for the img</dd>
<dt>autoplay</dt>
<dd><code>bool</code></dd>
<dt>loop</dt>
<dd><code>int</code>number of times to loop, true if infinite</dd>
<dt>sclae</dt>
<dd><code>bool</code></dd>
<dt>position</dt>
<dd>the css position of the video</dd>
<dt>opacity</dt>
<dd><code>int</code> 0 - 1</dd>
<dt>textReplacement</dt>
<dd><code>bool</code> - used if you are replacing text</dd>
<dt>zIndex</dt>
<dd>optional</dd>
<dt>width</dt>
<dd><i>required if textReplacement.</i></dd>
<dt>height</dt>
<dd><i>required if textReplacement.</i></dd>
</dl>
</div>
<div id="demos" class="tab">
<h2>Demos</h2>
<ul>
<li><a href="demo_bg.html">Man example of a background video</a></li>
<li><a href="demo_div.html">Example of a background of a div</a></li>
<li><a href="demo_text.html">Text Replacement example</a></li>
</ul>
</div>
<div id="donate" class="tab">
<h2>Donate a beer</h2>
<p>You are more than welcome to donate me some beer money :)</p>
<p>I recommend £3 for a donation, just £3!</p>
<a href='http://www.pledgie.com/campaigns/14895'><img alt='Click here to lend your support to: jquery.videoBG and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/14895.png?skin_name=chrome' border='0' /></a>
</div>
<div id="footer">
<a href="http://sydlawrence.com" style="float:right">Handcrafted by Syd</a>
<a href="http://twitter.com/sydlawrence">Follow me</a>
</div>
</div>
<div class="clearfix"> </div>
</div>
</body>
</html>