Skip to content

Commit 83903b0

Browse files
committed
add ogg video for firefox option
1 parent f35a0ee commit 83903b0

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

example-ogg.html

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6+
<title>BigVideo.js - The jQuery Plugin for Big Background Video</title>
7+
<meta name="description" content="BigVideo.js - The jQuery Plugin for Big Background Video" />
8+
<meta name="author" content="John Polacek" />
9+
<meta name="viewport" content="width=device-width">
10+
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:900&text=ABCDEFGHIJKLMNOPQRSTUVWXYZ' rel='stylesheet' type='text/css'>
11+
<link rel="stylesheet" href="css/style.css">
12+
<link rel="stylesheet" href="css/bigvideo.css">
13+
</head>
14+
<body>
15+
<!-- BigVideo Dependencies -->
16+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
17+
<script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>
18+
<script src="js/jquery-ui-1.8.22.custom.min.js"></script>
19+
<script src="js/jquery.imagesloaded.min.js"></script>
20+
<script src="http://vjs.zencdn.net/c/video.js"></script>
21+
22+
<!-- BigVideo -->
23+
<script src="js/bigvideo.js"></script>
24+
25+
<!-- Demo -->
26+
<script>
27+
$(function() {
28+
var BV = new $.BigVideo({useFlashForFirefox:false});
29+
BV.init();
30+
BV.show('vids/river.mp4', {ogg:'vids/river.ogv'});
31+
});
32+
</script>
33+
</body>
34+
</html>

index.html

+7
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ <h2>Setup</h2>
5858
var BV = new $.BigVideo();
5959
BV.init();
6060
BV.show('http://video-js.zencoder.com/oceans-clip.mp4');
61+
});</pre></blockquote></p>
62+
<p>For best results in Firefox, create an Ogg version of your video and configure BigVideo.js like this:</p>
63+
<p><blockquote><pre>
64+
$(function() {
65+
var BV = new $.BigVideo({useFlashForFirefox:false});
66+
BV.init();
67+
BV.show('vids/river.mp4', {ogg:'vids/river.ogv'});
6168
});</pre></blockquote></p>
6269
</div>
6370

js/bigvideo.js

+3
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@
287287
if (ext === 'jpg' || ext === 'gif' || ext === 'png') {
288288
showPoster(source);
289289
} else {
290+
if (options !== undefined && options.ogg && navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
291+
source = options.ogg;
292+
}
290293
playVideo(source);
291294
isQueued = false;
292295
}

vids/river.ogv

1.85 MB
Binary file not shown.

0 commit comments

Comments
 (0)