forked from pupunzi/jquery.mb.YTPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_background.html
94 lines (80 loc) · 3.33 KB
/
demo_background.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
<!doctype html>
<!--
~ jquery.mb.components
~ Copyright (c) 2001-2010. Matteo Bicocchi (Pupunzi); Open lab srl, Firenze - Italy
~ email: [email protected]
~ site: http://pupunzi.com
~
~ Licences: MIT, GPL
~ http://www.opensource.org/licenses/mit-license.php
~ http://www.gnu.org/licenses/gpl.html
-->
<html>
<head>
<title>youtube Chromeless fullscreen</title>
<link href="css/mb.YTVPlayer.css" media="all" rel="stylesheet" type="text/css">
<style type="text/css">
body{
background: url("images/06.jpg");
margin:0;
}
#content{
color:white;
font:40px/40px Calibri;
text-align:center;
padding-top:200px;
text-shadow:#666666 2px 2px 4px;
}
.movie{
display:none;
}
.dida{
position:fixed;
bottom:0;
font: 12px/14px Arial, sans-serif;
color:white;
padding:10px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="inc/jquery.metadata.js"></script>
<script type="text/javascript" src="inc/jquery.mb.YTPlayer.js"></script>
<script type="text/javascript">
$.fn.changeMovie=function(url){
var player = $(this).get(0);
var data = $("#"+player.id+"_data").get(0);
data.movieURL=(url.match( /[\\?&]v=([^&#]*)/))[1];
player.loadVideoByUrl("http://www.youtube.com/v/"+data.movieURL, 0);
};
$.fn.changeVolume=function(val){
var player = $(this).get(0);
var data = $("#"+player.id+"_data").get(0);
if(!val && !data.vol)
val=100;
else if((!val && data.vol>0) || (val && data.vol==val))
data.vol=0;
else
data.vol=val;
player.setVolume(data.vol);
};
$(function(){
$(".movie").mb_YTPlayer();
});
</script>
</head>
<body>
<div id="content">
<img src="http://pupunzi.com/images/logo.png" alt="mb">
<br><br>
This is a Youtube movie setted as background of this page<br><br>
<button onclick="$('#bgndVideo').changeMovie('http://www.youtube.com/watch?v=-gLLPGrJm3M')"> view Benigni's movie </button>
<button onclick="$('#bgndVideo').changeVolume(100)"> switch volume </button>
<!--<a id="bgndVideo" href="http://www.youtube.com/watch?v=MR9av-I35ME" class="movie {opacity:.4, isBgndMovie:{width:'1990',mute:false}, ratio:'4/3'}">analyzeNA</a>-->
<!--<a id="bgndVideo" href="http://www.youtube.com/watch?v=USI3M7n1jsk" class="movie {opacity:.8, isBgndMovie:{width:'1920',mute:true}, ratio:'16/9',quality:'default'}">analyzeNA</a>-->
<a id="bgndVideo" href="http://www.youtube.com/watch?v=USI3M7n1jsk" class="movie {opacity:.8, isBgndMovie:{width:'window',mute:false}, ratio:'4/3',quality:'default'}">analyzeNA</a>
<!--<a id="bgndVideo" href="http://www.youtube.com/watch?v=USI3M7n1jsk" class="movie {opacity:.8, isBgndMovie:{width:'window',mute:true}, ratio:'16/9',quality:'default'}">analyzeNA</a>-->
</div>
</body>
<div class="dida">Urban Abstract Art Director Jopsu Ramu from Musuta Ltd.</div>
<!--<div class="dida">Bill Viola - The Quintet of the Astonished (2000)</div>-->
</html>