forked from videojs/video.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
video-js.css
301 lines (272 loc) · 19 KB
/
video-js.css
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
/*
VideoJS Default Styles (http://videojs.com)
Version 2.0.2
REQUIRED STYLES (be careful overriding)
================================================================================ */
/* Box containing video, controls, and download links.
Will be set to the width of the video element through JS
If you want to add some kind of frame or special positioning, use another containing element, not video-js-box. */
.video-js-box { text-align: left; position: relative; line-height: 0 !important; margin: 0; padding: 0 !important; border: none !important; }
/* Video Element */
video.video-js { background-color: #000; position: relative; padding: 0; }
.vjs-flash-fallback { display: block; }
/* Poster Overlay Style */
.video-js-box img.vjs-poster { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
/* Subtiles Style */
.video-js-box .vjs-subtitles {
color:#fff;
font: 20px arial, helvetica, sans-serif;
text-align: center;
bottom: 0.75em;
margin-bottom: 1.25em;
left: 0;
right: 0;
position: absolute;
text-shadow:0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000,
0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000,
0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000,
0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000,
0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000,
0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000,
0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000,
0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0.05em #000000, 0 -0.05em 0.05em #000000, 0.05em 0 0.05em #000000, -0.05em 0 0.05em #000000, 0 0.05em 0 #000000, 0 -0.05em 0 #000000, 0.05em 0 0 #000000, -0.05em 0 0 #000000;
}
.video-js-box .vjs-subtitles.vjs-controls-hidden {
margin-bottom: 0px;
}
/* Fullscreen styles for main elements */
.video-js-box.vjs-fullscreen { position: fixed; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: 1000; }
.video-js-box.vjs-fullscreen video.video-js,
.video-js-box.vjs-fullscreen .vjs-flash-fallback { position: relative; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; }
.video-js-box.vjs-fullscreen img.vjs-poster { z-index: 1001; }
.video-js-box.vjs-fullscreen .vjs-spinner { z-index: 1001; }
.video-js-box.vjs-fullscreen .vjs-controls { z-index: 1003; }
.video-js-box.vjs-fullscreen .vjs-big-play-button { z-index: 1004; }
.video-js-box.vjs-fullscreen .vjs-subtitles { z-index: 1004; }
/* Styles Loaded Check */
.vjs-styles-check { height: 5px; position: absolute; }
/* Controls Below Video */
.video-js-box.vjs-controls-below .vjs-controls { position: relative; opacity: 1; background-color: transparent; }
.video-js-box.vjs-controls-below.vjs-fullscreen .vjs-controls { background-color: #000; }
.video-js-box.vjs-controls-below .vjs-subtitles { bottom: 50px; margin-bottom: 0px; } /* Account for height of controls below video */
/* DEFAULT SKIN (override in another file)
================================================================================
Using all CSS to draw the controls. Images could be used if desired.
Instead of editing this file, I recommend creating your own skin CSS file to be included after this file,
so you can upgrade to newer versions easier. */
/* Controls Layout
Using absolute positioning to position controls */
.video-js-box .vjs-controls {
font-size: 10px !important;
position: absolute; margin: 0; opacity: 0.85; color: #fff;
display: none; /* Start hidden */
left: 0; right: 0; /* 100% width of video-js-box */
width: 100%;
bottom: 0px; /* Distance from the bottom of the box/video. Keep 0. Use height to add more bottom margin. */
height: 3.5em; /* Including any margin you want above or below control items */
padding: 0; /* Controls are absolutely position, so no padding necessary */
-webkit-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
-ms-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
.vjs-hide {
opacity: 0 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; /* IE8 */
filter: alpha(opacity=0); /* IE5-7 */
}
.vjs-show {
opacity: 1 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; /* IE8 */
filter: alpha(opacity=100); /* IE5-7 */
}
.video-js-box .vjs-controls > div { /* Direct div children of control bar */
position: absolute; /* Use top, bottom, left, and right to specifically position the control. */
text-align: center; margin: 0; padding: 0;
height: 2.5em; /* Default height of individual controls */
top: 0.5em; /* Top margin to put space between video and controls when controls are below */
/* CSS Background Gradients
Using to give the aqua-ish look. */
/* Default */ background-color: #0B151A;
/* Webkit */ background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 1.2em;
/* Firefox */ background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 1.2em;
/* CSS Curved Corners */
border-radius: 0.5em; -webkit-border-radius: 0.5em; -moz-border-radius: 0.5em;
/* CSS Shadows */
box-shadow: 0.1em 0.1em 0.2em #000; -webkit-box-shadow: 0.1em 0.1em 0.2em #000; -moz-box-shadow: 0.1em 0.1em 0.2em #000;
}
/* Placement of Control Items
- Left side of pogress bar, use left & width
- Rigth side of progress bar, use right & width
- Expand with the video (like progress bar) use left & right */
.vjs-controls > div.vjs-play-control { left: 0.5em; width: 2.5em; }
.vjs-controls > div.vjs-progress-control { left: 3.5em; right: 16.5em; } /* Using left & right so it expands with the width of the video */
.vjs-controls > div.vjs-time-control { width: 7.5em; right: 9em; cursor:default; -moz-user-select: none; -webkit-user-select: none; user-select: none; } /* Time control and progress bar are combined to look like one */
.vjs-controls > div.vjs-volume-control { width: 5em; right: 3.5em; }
.vjs-controls > div.vjs-subtitles-control { width: 2.5em; right: 3.5em; }
.vjs-controls > div.vjs-fullscreen-control { width: 2.5em; right: 0.5em; }
.vjs-subtitles-on .vjs-controls > div.vjs-progress-control { right: 19.5em; }
.vjs-subtitles-on .vjs-controls > div.vjs-time-control { right: 12em; }
.vjs-subtitles-on .vjs-controls > div.vjs-volume-control { right: 6.5em; }
/* Removing curved corners on progress control and time control to join them. */
.vjs-controls > div.vjs-progress-control {
border-top-right-radius: 0; -webkit-border-top-right-radius: 0; -moz-border-radius-topright: 0;
border-bottom-right-radius: 0; -webkit-border-bottom-right-radius: 0; -moz-border-radius-bottomright: 0;
}
.vjs-controls > div.vjs-time-control {
border-top-left-radius: 0; -webkit-border-top-left-radius: 0; -moz-border-radius-topleft: 0;
border-bottom-left-radius: 0; -webkit-border-bottom-left-radius: 0; -moz-border-radius-bottomleft: 0;
}
.vjs-controls > div.vjs-time-control abbr {
border: none;
}
/* Play/Pause
-------------------------------------------------------------------------------- */
.vjs-play-control { cursor: pointer !important; }
/* Play Icon */
.vjs-play-control span { display: block; font-size: 1em; line-height: 0; }
.vjs-paused .vjs-play-control span {
width: 0; height: 0; margin: 0.8em 0 0 0.8em;
/* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
border-left: 1em solid #fff; /* Width & Color of play icon */
/* Height of play icon is total top & bottom border widths. Color is transparent. */
border-top: 0.5em solid rgba(0,0,0,0); border-bottom: 0.5em solid rgba(0,0,0,0);
}
.vjs-playing .vjs-play-control span {
width: 0.3em; height: 1em; margin: 0.8em auto 0;
/* Drawing the pause bars with borders */
border-top: 0px; border-left: 0.3em solid #fff; border-bottom: 0px; border-right: 0.3em solid #fff;
}
/* Progress
-------------------------------------------------------------------------------- */
.vjs-progress-holder { /* Box containing play and load progresses */
position: relative; padding: 0; overflow:visible; cursor: pointer !important;
height: 0.9em; border: 0.1em solid #777;
margin: 0.7em 0.1em 0 0.5em; /* Placement within the progress control item */
border-radius: 0.5em; -webkit-border-radius: 0.5em; -moz-border-radius: 0.5em;
}
.vjs-progress-holder div { /* Progress Bars */
position: absolute; display: block; width: 0; height: 0.9em; margin: 0; padding: 0;
border-radius: 0.5em; -webkit-border-radius: 0.5em; -moz-border-radius: 0.5em;
outline-offset: 0.2em;
}
.vjs-play-progress {
/* CSS Gradient */
/* Default */ background: #fff;
/* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#777));
/* Firefox */ background: -moz-linear-gradient(top, #fff, #777);
}
.vjs-load-progress {
opacity: 0.8;
/* CSS Gradient */
/* Default */ background-color: #555;
/* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#555), to(#aaa));
/* Firefox */ background: -moz-linear-gradient(top, #555, #aaa);
}
/* Time Display
-------------------------------------------------------------------------------- */
.vjs-controls .vjs-time-control { font-size: 1em; line-height: 1; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
.vjs-controls .vjs-time-control span { line-height: 2.5em; /* Centering vertically */ }
/* Volume
-------------------------------------------------------------------------------- */
.vjs-volume-control { cursor: pointer !important; }
.vjs-volume-control div { display: block; margin: 0 0 0 0.5em; padding: 0.4em 0 0 0; }
/* Drawing the volume icon using 6 span elements */
.vjs-volume-control div span { /* Individual volume bars */
float: left; padding: 0;
margin: 0 0.2em 0 0; /* Space between */
width: 0.5em; height: 0; /* Total height is height + bottom border */
border-bottom: 1.8em solid #555; /* Default (off) color and height of visible portion */
}
.vjs-volume-control div span.vjs-volume-level-on { border-color: #fff; /* Volume on bar color */ }
/* Creating differnt bar heights through height (transparent) and bottom border (visible). */
.vjs-volume-control div span:nth-child(1) { border-bottom-width: 0.2em; height: 1.6em; }
.vjs-volume-control div span:nth-child(2) { border-bottom-width: 0.4em; height: 1.4em; }
.vjs-volume-control div span:nth-child(3) { border-bottom-width: 0.7em; height: 1.1em; }
.vjs-volume-control div span:nth-child(4) { border-bottom-width: 1em; height: 0.8em; }
.vjs-volume-control div span:nth-child(5) { border-bottom-width: 1.4em; height: 0.4em; }
.vjs-volume-control div span:nth-child(6) { margin-right: 0; }
/* Subtitles control
-------------------------------------------------------------------------------- */
.vjs-controls .vjs-subtitles-control { font-size: 1em; line-height: 1em; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
.vjs-controls .vjs-subtitles-control abbr { line-height: 1.2em; border:none; /* Centering vertically */ }
.vjs-controls .vjs-subtitles-control span { display:block; border:0.25em solid #fff; position: relative; width: 1.6em; margin: 0.5em 0.25em; text-align:center; }
.vjs-controls .vjs-subtitles-control span span { border:0.2em solid #fff; position: relative; margin:-0.2em -0.2em;
-webkit-border-radius:0.5em; /* Saf3+, Chrome */
border-radius: 0.5em; /* Opera 10.5, IE 9 */
-moz-border-radius:0.5em; /* Disabled for FF1+ */
}
/* Fullscreen
-------------------------------------------------------------------------------- */
.vjs-fullscreen-control { cursor: pointer !important; }
.vjs-fullscreen-control div {
padding: 0; text-align: left; vertical-align: top; cursor: pointer !important;
margin: 0.5em 0 0 0.5em; /* Placement within the fullscreen control item */
width: 2em; height: 2em;
}
/* Drawing the fullscreen icon using 4 span elements */
.vjs-fullscreen-control div span { float: left; margin: 0; padding: 0; font-size: 1em; line-height: 0; width: 0; text-align: left; vertical-align: top; }
.vjs-fullscreen-control div span:nth-child(1) { /* Top-left triangle */
margin-right: 0.3em; /* Space between top-left and top-right */
margin-bottom: 0.3em; /* Space between top-left and bottom-left */
border-top: 0.6em solid #fff; /* Height and color */
border-right: 0.6em solid rgba(0,0,0,0); /* Width */
}
.vjs-fullscreen-control div span:nth-child(2) { border-top: 0.6em solid #fff; border-left: 0.6em solid rgba(0,0,0,0); }
.vjs-fullscreen-control div span:nth-child(3) { clear: both; margin: 0 0.3em 0 0; border-bottom: 0.6em solid #fff; border-right: 0.6em solid rgba(0,0,0,0); }
.vjs-fullscreen-control div span:nth-child(4) { border-bottom: 0.6em solid #fff; border-left: 0.6em solid rgba(0,0,0,0); }
/* Icon when video is in fullscreen mode */
.vjs-fullscreen .vjs-fullscreen-control div span:nth-child(1) { border: none; border-bottom: 0.6em solid #fff; border-left: 0.6em solid rgba(0,0,0,0); }
.vjs-fullscreen .vjs-fullscreen-control div span:nth-child(2) { border: none; border-bottom: 0.6em solid #fff; border-right: 0.6em solid rgba(0,0,0,0); }
.vjs-fullscreen .vjs-fullscreen-control div span:nth-child(3) { border: none; border-top: 0.6em solid #fff; border-left: 0.6em solid rgba(0,0,0,0); }
.vjs-fullscreen .vjs-fullscreen-control div span:nth-child(4) { border: none; border-top: 0.6em solid #fff; border-right: 0.6em solid rgba(0,0,0,0); }
/* Download Links - Used for browsers that don't support any video.
---------------------------------------------------------*/
.vjs-no-video { font-size: small; line-height: 1.5; }
/* Big Play Button (at start)
---------------------------------------------------------*/
div.vjs-big-play-button {
display: none; /* Start hidden */ z-index: 2;
position: absolute; top: 50%; left: 50%; width: 80px; height: 80px; margin: -43px 0 0 -43px; text-align: center; vertical-align: center; cursor: pointer !important;
border: 3px solid #fff; opacity: 0.9;
border-radius: 20px; -webkit-border-radius: 20px; -moz-border-radius: 20px;
/* CSS Background Gradients */
/* Default */ background-color: #0B151A;
/* Webkit */ background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 40px;
/* Firefox */ background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 40px;
/* CSS Shadows */
box-shadow: 4px 4px 8px #000; -webkit-box-shadow: 4px 4px 8px #000; -moz-box-shadow: 4px 4px 8px #000;
}
div.vjs-big-play-button:hover {
box-shadow: 0px 0px 80px #fff; -webkit-box-shadow: 0px 0px 80px #fff; -moz-box-shadow: 0px 0px 80px #fff;
}
div.vjs-big-play-button span {
display: block; font-size: 0; line-height: 0;
width: 0; height: 0; margin: 20px 0 0 23px;
/* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
border-left: 40px solid #fff; /* Width & Color of play icon */
/* Height of play icon is total top & bottom border widths. Color is transparent. */
border-top: 20px solid rgba(0,0,0,0); border-bottom: 20px solid rgba(0,0,0,0);
}
/* Spinner Styles
---------------------------------------------------------*/
/* CSS Spinners by Kilian Valkhof - http://kilianvalkhof.com/2010/css-xhtml/css3-loading-spinners-without-images/ */
.vjs-spinner { display: none; position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; z-index: 1; margin: -50px 0 0 -50px;
/* Scaling makes the circles look smoother. */
transform: scale(0.5); -webkit-transform:scale(0.5); -moz-transform:scale(0.5);
}
/* Spinner circles */
.vjs-spinner div { position:absolute; left: 40px; top: 40px; width: 20px; height: 20px; background: #fff;
border-radius: 20px; -webkit-border-radius: 20px; -moz-border-radius: 20px;
border: 1px solid #ccc; /* Added border so can be visible on white backgrounds */
}
/* Each circle */
.vjs-spinner div:nth-child(1) { opacity: 0.12; transform: rotate(000deg) translate(0, -40px) scale(0.1); -webkit-transform: rotate(000deg) translate(0, -40px) scale(0.1); -moz-transform: rotate(000deg) translate(0, -40px) scale(0.1); }
.vjs-spinner div:nth-child(2) { opacity: 0.25; transform: rotate(045deg) translate(0, -40px) scale(0.2); -webkit-transform: rotate(045deg) translate(0, -40px) scale(0.2); -moz-transform: rotate(045deg) translate(0, -40px) scale(0.2); }
.vjs-spinner div:nth-child(3) { opacity: 0.37; transform: rotate(090deg) translate(0, -40px) scale(0.4); -webkit-transform: rotate(090deg) translate(0, -40px) scale(0.4); -moz-transform: rotate(090deg) translate(0, -40px) scale(0.4); }
.vjs-spinner div:nth-child(4) { opacity: 0.50; transform: rotate(135deg) translate(0, -40px) scale(0.6); -webkit-transform: rotate(135deg) translate(0, -40px) scale(0.6); -moz-transform: rotate(135deg) translate(0, -40px) scale(0.6); }
.vjs-spinner div:nth-child(5) { opacity: 0.62; transform: rotate(180deg) translate(0, -40px) scale(0.8); -webkit-transform: rotate(180deg) translate(0, -40px) scale(0.8); -moz-transform: rotate(180deg) translate(0, -40px) scale(0.8); }
.vjs-spinner div:nth-child(6) { opacity: 0.75; transform: rotate(225deg) translate(0, -40px) scale(1.0); -webkit-transform: rotate(225deg) translate(0, -40px) scale(1.0); -moz-transform: rotate(225deg) translate(0, -40px) scale(1.0); }
.vjs-spinner div:nth-child(7) { opacity: 0.87; transform: rotate(270deg) translate(0, -40px) scale(1.1); -webkit-transform: rotate(270deg) translate(0, -40px) scale(1.1); -moz-transform: rotate(270deg) translate(0, -40px) scale(1.1); }
.vjs-spinner div:nth-child(8) { opacity: 1.00; transform: rotate(315deg) translate(0, -40px) scale(1.3); -webkit-transform: rotate(315deg) translate(0, -40px) scale(1.3); -moz-transform: rotate(315deg) translate(0, -40px) scale(1.3); }