forked from stamat/youtube-background
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·116 lines (106 loc) · 3.71 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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>jQuery Youtube Background</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/228006f19a.js" crossorigin="anonymous"></script>
<style>
html, body {
font-family: 'Lato', sans-serif;
color: #1d1d1d;
padding: 0px;
margin: 0px;
}
.example-marquee {
position: relative;
}
.content {
display: table;
width: 100%;
min-height: 100vh;
z-index: 1;
position: relative;
}
.content .inner {
display: table-cell;
vertical-align: middle;
text-align: center;
padding-left: 16px;
padding-right: 16px;
}
.content .inner h1 {
font-size: 62px;
color: white;
text-shadow: 0px 1px 3px rgba(0,0,0,0.5);
}
.video-background-controls button {
font-size: 32px;
display: inline-block;
padding: 0px;
margin: 0px;
height: 32px;
width: 32px;
border-radius: 16px;
line-height: 32px;
border: none;
background: none;
-webkit-appearance: none;
color: white;
filter: drop-shadow(0px 0px 1px black);
cursor: pointer;
opacity: 1;
transition: all 250ms ease-in-out;
margin-left: 10px;
}
.video-background-controls button:hover {
opacity: 0.5;
}
iframe {
transition: opacity 500ms ease-in-out;
transition-delay: 250ms;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery.youtube-background.js?v=1.0.8"></script>
</head>
<body>
<div class="container">
<main>
<div class="example-marquee">
<div id="ytbg" data-ytbg-fade-in="true" data-youtube="https://www.youtube.com/watch?v=eEpEeyqGlxA"></div>
<div class="content">
<div class="inner">
<h1>Cake in a frying pan? Impossible!</h1>
</div>
</div>
</div>
<div class="example-marquee">
<div id="ytbg2" data-ytbg-play-button="true" data-youtube="https://www.youtube.com/watch?v=MgDZBqTuUuE"></div>
<div class="content">
<div class="inner">
<h1>Click the button to pause.</h1>
</div>
</div>
</div>
<div class="example-marquee">
<div id="ytbg3" data-ytbg-mute-button="true" data-ytbg-play-button="true" data-ytbg-resolution="4:3" data-youtube="https://www.youtube.com/watch?v=dQw4w9WgXcQ
"></div>
<div class="content">
<div class="inner">
<h1>Mute / Unmute.</h1>
</div>
</div>
</div>
</main>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('[data-youtube]').youtube_background();
});
</script>
</body>
</html>