@vidispine/vdt-videojs 23.1.0 → 23.2.0-pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -456
- package/dist/index.js +1915 -342
- package/dist/index.umd.cjs +460 -0
- package/package.json +24 -22
- package/deprecated-app/README.md +0 -21
- package/deprecated-app/index.html +0 -298
- package/deprecated-app/index.js +0 -614
- package/deprecated-app/samples/birds-es.vvt +0 -53
- package/deprecated-app/samples/birds.vvt +0 -53
- package/deprecated-app/tests.js +0 -365
- package/dist/index.es.js +0 -335
- package/dist/index.umd.js +0 -351
- package/rollup.config.js +0 -58
- package/screenshot.png +0 -0
- package/src/constants.js +0 -51
- package/src/externalControls.js +0 -318
- package/src/helpOverlay.js +0 -110
- package/src/helpers.js +0 -39
- package/src/index.js +0 -7
- package/src/index.stories.mdx +0 -52
- package/src/menu.api.stories.mdx +0 -53
- package/src/menu.js +0 -373
- package/src/menu.usage.stories.mdx +0 -78
- package/src/osd.js +0 -105
- package/src/player.api.stories.mdx +0 -114
- package/src/player.js +0 -1029
- package/src/player.scss +0 -604
- package/src/player.usage.stories.mdx +0 -62
- package/src/seekBar.js +0 -904
- package/src/timeCodeDisplay.js +0 -274
- package/src/videoTime.js +0 -66
package/src/player.scss
DELETED
|
@@ -1,604 +0,0 @@
|
|
|
1
|
-
@import '~video.js/dist/video-js.css';
|
|
2
|
-
|
|
3
|
-
$red: #f00;
|
|
4
|
-
$dark-translucent: rgba(28,28,28,0.9);
|
|
5
|
-
$dark-gray: #333;
|
|
6
|
-
$light-translucent: rgba(255,255,255,.2);
|
|
7
|
-
$large-icon-size: 90px;
|
|
8
|
-
$controls-height: 50px;
|
|
9
|
-
$mid-opacity: 0.6;
|
|
10
|
-
$mid-radius: 7px;
|
|
11
|
-
|
|
12
|
-
//remove safari's and other webkit browser's blue glow on tab selection
|
|
13
|
-
textarea, select, input, button, video { outline: none; }
|
|
14
|
-
button:focus, .video-js .vjs-menu-item{
|
|
15
|
-
outline: initial;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.video-js{
|
|
19
|
-
max-width: 100%;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
|
|
22
|
-
&.init{
|
|
23
|
-
height: 0px !important;
|
|
24
|
-
display: none;;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
video{
|
|
28
|
-
transform: translate3d(0px, 0px, 0px);
|
|
29
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.vjs-poster{
|
|
34
|
-
background-size: cover;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.vjs-control-bar{
|
|
38
|
-
height: $controls-height;
|
|
39
|
-
padding-top: 6px;
|
|
40
|
-
display: flex;
|
|
41
|
-
/* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#000000+0,000000+100&0+15,0.3+100 */
|
|
42
|
-
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 15%, rgba(0,0,0,0.3) 100%); /* FF3.6-15 */
|
|
43
|
-
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 15%,rgba(0,0,0,0.3) 100%); /* Chrome10-25,Safari5.1-6 */
|
|
44
|
-
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 15%,rgba(0,0,0,0.3) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
|
45
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#00000000", endColorstr="#4d000000",GradientType=0 ); /* IE6-9 */
|
|
46
|
-
|
|
47
|
-
transform: translate3d(0px, 0px, 0px);
|
|
48
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
|
49
|
-
z-index: 2;
|
|
50
|
-
|
|
51
|
-
.vdt-seekbar-wrapper{
|
|
52
|
-
top: 0px;
|
|
53
|
-
left: 0px;
|
|
54
|
-
height: 10px;
|
|
55
|
-
width: 100%;
|
|
56
|
-
position: absolute;
|
|
57
|
-
margin: 0 auto;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.vjs-big-play-button{
|
|
62
|
-
font-size: $large-icon-size;
|
|
63
|
-
border: 0px;
|
|
64
|
-
background-color: transparent;
|
|
65
|
-
text-shadow: 1px 2px 40px rgba(0,0,0,.4);
|
|
66
|
-
z-index: 2;
|
|
67
|
-
|
|
68
|
-
.vjs-icon-placeholder:before{
|
|
69
|
-
padding-top: 5px; // play button offset correction
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&:hover{
|
|
74
|
-
.vjs-big-play-button,
|
|
75
|
-
.vjs-big-play-button:focus{
|
|
76
|
-
background-color: transparent;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
//control bar
|
|
82
|
-
.vjs-progress-control {
|
|
83
|
-
top: 0px;
|
|
84
|
-
left: 0px;
|
|
85
|
-
position: absolute;
|
|
86
|
-
display: block;
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 10px;
|
|
89
|
-
|
|
90
|
-
.vjs-load-progress{
|
|
91
|
-
background: $light-translucent;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&:hover .vjs-play-progress .vjs-time-tooltip,
|
|
95
|
-
.vjs-play-progress .vjs-time-tooltip{
|
|
96
|
-
display: none;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// push everything after time display to the right side
|
|
101
|
-
.vjs-time-control{
|
|
102
|
-
&.duration, &.vjs-duration{
|
|
103
|
-
margin-right: auto;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.vjs-subs-caps-button, .vdt-screenshot-button{
|
|
108
|
-
.vjs-icon-placeholder{
|
|
109
|
-
opacity: .6;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&.has-vdt-menu .vjs-subs-caps-button{
|
|
114
|
-
display: none;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&.subtitles-active{
|
|
118
|
-
.vjs-subs-caps-button .vjs-icon-placeholder{
|
|
119
|
-
opacity: 1;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.vjs-control{
|
|
124
|
-
font-size: 14px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.vjs-play-progress.vjs-slider-bar{
|
|
128
|
-
background-color: $red;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.vjs-current-time,
|
|
132
|
-
.vjs-time-control,
|
|
133
|
-
.vjs-no-flex .vjs-current-time{
|
|
134
|
-
display: block;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.vjs-time-control{
|
|
138
|
-
font-size: 14px;
|
|
139
|
-
padding: 0px;
|
|
140
|
-
min-width: 14px;
|
|
141
|
-
text-align: center;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.vjs-volume-panel{
|
|
145
|
-
// margin-right: 20px;
|
|
146
|
-
width: 3em;
|
|
147
|
-
.vjs-mute-control{
|
|
148
|
-
width: 3em;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.vjs-menu-button-popup .vjs-menu{
|
|
153
|
-
bottom: 20px;
|
|
154
|
-
.vjs-menu-content{
|
|
155
|
-
background-color: $dark-translucent;
|
|
156
|
-
border-radius: $mid-radius;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
li.vjs-menu-item:focus:not(.vjs-selected){
|
|
160
|
-
background-color: transparent;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
li.vjs-menu-item:hover:not(.vjs-selected){
|
|
164
|
-
background-color: $light-translucent
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.vjs-menu-item-text{
|
|
168
|
-
color: white;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.vjs-menu-item.vjs-selected .vjs-menu-item-text{
|
|
172
|
-
color: #333;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
//our special osd (hosts custom play button and other features in the future, has css vertical centering)
|
|
177
|
-
.vdt-player-osd{
|
|
178
|
-
pointer-events: none;
|
|
179
|
-
position: absolute;
|
|
180
|
-
top: 0px; left: 0px;
|
|
181
|
-
height: 100%;
|
|
182
|
-
width: 100%;
|
|
183
|
-
opacity: 0;
|
|
184
|
-
z-index: 4;
|
|
185
|
-
-webkit-transform: translate3d(0px,0px,0px) scale3d(0.5,0.5,.5);
|
|
186
|
-
-webkit-backface-visibility: hidden;
|
|
187
|
-
backface-visibility: hidden;
|
|
188
|
-
transform: translate3d(0px,0px,0px) scale3d(0.5,0.5,.5);
|
|
189
|
-
transition: 200ms ease-out all;
|
|
190
|
-
// animation-fill-mode: backwards;
|
|
191
|
-
|
|
192
|
-
&.active{
|
|
193
|
-
opacity: 1;
|
|
194
|
-
-webkit-transform: scale3d(1,1,1);
|
|
195
|
-
transform: scale3d(1,1,1);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
table{
|
|
199
|
-
width: 100%; height: 100%;
|
|
200
|
-
td{
|
|
201
|
-
vertical-align: middle;
|
|
202
|
-
text-align: center;
|
|
203
|
-
.osd-feedback-icon{
|
|
204
|
-
&:before{
|
|
205
|
-
font-family: VideoJS;
|
|
206
|
-
content: "\f101";
|
|
207
|
-
font-size: 50px;
|
|
208
|
-
padding: 15px;
|
|
209
|
-
display: inline-block;
|
|
210
|
-
height: 80px; //20 + 20 + 60
|
|
211
|
-
width: 80px;
|
|
212
|
-
text-align: center;
|
|
213
|
-
background: rgba(0,0,0,.2);
|
|
214
|
-
border-radius: 100%;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
.pause:before{
|
|
218
|
-
content: "\f103";
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.volchange.high:before{
|
|
222
|
-
content: "\f107";
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.volchange.mid:before{
|
|
226
|
-
content: "\f106";
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.volchange.low:before{
|
|
230
|
-
content: "\f105";
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.mute:before, .volchange.null:before{
|
|
234
|
-
content: "\f104";
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.unmute:before{
|
|
238
|
-
content: "\f107";
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.forward-jump:before, .backward-jump:before{
|
|
242
|
-
content: "\f101\f101";
|
|
243
|
-
letter-spacing: -38px;
|
|
244
|
-
padding-left: 0px;
|
|
245
|
-
padding-right: 34px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.backward-jump:before{
|
|
249
|
-
-webkit-transform: scaleX(-1);
|
|
250
|
-
transform: scaleX(-1);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
//spinner / loader customizations
|
|
258
|
-
@keyframes vjs-spinner-fade {
|
|
259
|
-
0% {
|
|
260
|
-
border-top-color: rgba(255, 255, 255, 0.6);
|
|
261
|
-
}
|
|
262
|
-
35% {
|
|
263
|
-
border-top-color: white;
|
|
264
|
-
}
|
|
265
|
-
100% {
|
|
266
|
-
border-top-color: rgba(255, 255, 255, 0.6);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.vjs-loading-spinner {
|
|
271
|
-
&:after, &:before{
|
|
272
|
-
margin: -5px;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
margin: -40px 0 0 -40px;
|
|
276
|
-
opacity: 0.85;
|
|
277
|
-
border: 5px solid rgba(255, 255, 255, 0.7);
|
|
278
|
-
width: 80px;
|
|
279
|
-
height: 80px;
|
|
280
|
-
border-radius: 100px;
|
|
281
|
-
z-index: 5;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
//css relating to subtitles
|
|
286
|
-
.vjs-text-track-display, &.vjs-user-inactive.vjs-playing .vjs-text-track-display{
|
|
287
|
-
bottom: 0px;
|
|
288
|
-
transition: transform 300ms ease-out;
|
|
289
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
|
290
|
-
-webkit-backface-visibility: hidden;
|
|
291
|
-
backface-visibility: hidden;
|
|
292
|
-
> div{
|
|
293
|
-
display: table;
|
|
294
|
-
width: 100%;
|
|
295
|
-
height: 100%;
|
|
296
|
-
margin: 0px !important;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.vjs-text-track-cue{ //needs !important to override video.js inline styles
|
|
300
|
-
width: 100% !important;
|
|
301
|
-
bottom: 0px !important;
|
|
302
|
-
top: initial !important;
|
|
303
|
-
left: initial !important;
|
|
304
|
-
right: initial !important;
|
|
305
|
-
font-size: 18px !important;
|
|
306
|
-
height: auto !important;
|
|
307
|
-
padding-bottom: 1.5%;
|
|
308
|
-
display: table-cell;
|
|
309
|
-
|
|
310
|
-
> div{
|
|
311
|
-
padding: 2px 4px 2px 4px;
|
|
312
|
-
line-height: 1.25;
|
|
313
|
-
border-radius: 2px;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// applies to fullscreen
|
|
319
|
-
&.vjs-fullscreen,
|
|
320
|
-
&.vjs-user-inactive.vjs-playing.vjs-fullscreen{
|
|
321
|
-
.vjs-text-track-display .vjs-text-track-cue{
|
|
322
|
-
-webkit-backface-visibility: hidden;
|
|
323
|
-
backface-visibility: hidden;
|
|
324
|
-
font-size: 24px !important;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
// control bar animation
|
|
329
|
-
&.vjs-has-started.vjs-user-inactive.vjs-playing:not(.vjs-fullscreen), // prevent controls staying shown in fs
|
|
330
|
-
&div,
|
|
331
|
-
&.vjs-controls-enabled.vjs-user-active,
|
|
332
|
-
&.vjs-has-started.vjs-user-inactive.vjs-paused{
|
|
333
|
-
.vjs-control-bar {
|
|
334
|
-
opacity: 1;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
&.vjs-has-started.vjs-user-inactive.vjs-playing:not(.controls-below-player) .vjs-control-bar,
|
|
339
|
-
&:not(.controls-below-player) .vjs-control-bar{
|
|
340
|
-
-webkit-backface-visibility: hidden;
|
|
341
|
-
backface-visibility: hidden;
|
|
342
|
-
transform: translate3d(0px, $controls-height, 0px);
|
|
343
|
-
transition: transform 300ms ease-in-out;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
&.vjs-controls-enabled.vjs-user-active:not(.controls-below-player),
|
|
347
|
-
&.vjs-has-started.vjs-user-inactive.vjs-paused:not(.controls-below-player){
|
|
348
|
-
.vjs-control-bar{
|
|
349
|
-
transform: translate3d(0px, 0px, 0px);
|
|
350
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
&:not(.vjs-controls-disabled) .vjs-text-track-display{
|
|
354
|
-
transform: translate3d(0px, -$controls-height, 0px);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
//timecode
|
|
359
|
-
.vdt-timecode{
|
|
360
|
-
display: inline;
|
|
361
|
-
font-family: "monospace", sans-serif;
|
|
362
|
-
margin-left: 20px;
|
|
363
|
-
|
|
364
|
-
input, span{
|
|
365
|
-
font-size: 16px;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
span{
|
|
369
|
-
text-align: center;
|
|
370
|
-
display: inline-block;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
input{
|
|
374
|
-
display: inline-block;
|
|
375
|
-
width: auto;
|
|
376
|
-
border: 0px;
|
|
377
|
-
background: transparent;
|
|
378
|
-
color: inherit;
|
|
379
|
-
width: 21px;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
@media all and (max-width: 640px){
|
|
383
|
-
flex-grow: 3;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
.vdt-timecode.duration{ // read-only duration display timecode
|
|
389
|
-
margin-left: 0px;
|
|
390
|
-
margin-right: auto;
|
|
391
|
-
span{ cursor: default; }
|
|
392
|
-
&:before{
|
|
393
|
-
content: "/";
|
|
394
|
-
display: inline-block;
|
|
395
|
-
margin: 0px 5px;
|
|
396
|
-
font-size: 16px;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
@media all and (max-width: 640px){ // gets too cramped on mobile devices
|
|
400
|
-
display: none;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
// buttons
|
|
405
|
-
.vdt-cinema-button,
|
|
406
|
-
.vdt-settings-menu-button,
|
|
407
|
-
.vdt-screenshot-button{
|
|
408
|
-
cursor: pointer;
|
|
409
|
-
&:after{
|
|
410
|
-
content: "\f10b";
|
|
411
|
-
font-family: VideoJS;
|
|
412
|
-
font-size: 22px;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
&:active, &:focus{
|
|
416
|
-
opacity: $mid-opacity;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.vdt-cinema-button:after{
|
|
421
|
-
content: "\f10a";
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
.vdt-settings-menu-button:after{
|
|
425
|
-
content: "\f110";
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
// waveform visualisation
|
|
429
|
-
.vdt-waveform-visual, .vdt-help-overlay{
|
|
430
|
-
position: absolute;
|
|
431
|
-
top: 0px;
|
|
432
|
-
left: 0px;
|
|
433
|
-
background: #888;
|
|
434
|
-
height: 100%;
|
|
435
|
-
width: 100%;
|
|
436
|
-
display: none;
|
|
437
|
-
|
|
438
|
-
/* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#88bfe8+0,71a1c4+100 */
|
|
439
|
-
background: rgb(136,191,232); /* Old browsers */
|
|
440
|
-
background: -moz-linear-gradient(top, rgba(136,191,232,1) 0%, rgba(113,161,196,1) 100%); /* FF3.6-15 */
|
|
441
|
-
background: -webkit-linear-gradient(top, rgba(136,191,232,1) 0%,rgba(113,161,196,1) 100%); /* Chrome10-25,Safari5.1-6 */
|
|
442
|
-
background: linear-gradient(to bottom, rgba(136,191,232,1) 0%,rgba(113,161,196,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
|
443
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#88bfe8', endColorstr='#71a1c4',GradientType=0 ); /* IE6-9 */
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
canvas{
|
|
447
|
-
height: 100%;
|
|
448
|
-
width: 100%;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
&.vjs-has-started .vdt-waveform-visual{
|
|
453
|
-
display: block;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
// help overlay
|
|
457
|
-
.vdt-help-overlay{ // cascade unwanted css
|
|
458
|
-
font-size: 15px;
|
|
459
|
-
background: transparent;
|
|
460
|
-
z-index: 2;
|
|
461
|
-
transition: opacity 1s ease-in-out;
|
|
462
|
-
opacity: 0;
|
|
463
|
-
padding-bottom: 12px;
|
|
464
|
-
> table{
|
|
465
|
-
height: 100%;
|
|
466
|
-
margin: 0 auto;
|
|
467
|
-
|
|
468
|
-
td.vdt-help-contents{
|
|
469
|
-
table {
|
|
470
|
-
border-radius: $mid-radius;
|
|
471
|
-
max-height: 400px;
|
|
472
|
-
-webkit-backdrop-filter: blur(10px);
|
|
473
|
-
background: rgba(0,0,0,$mid-opacity);
|
|
474
|
-
|
|
475
|
-
td { padding: 6px 6px; } // inside table
|
|
476
|
-
|
|
477
|
-
td:nth-child(2), td td:nth-child(4){
|
|
478
|
-
padding: 4px 9px;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
td:nth-child(2){
|
|
482
|
-
padding-right: 32px;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
td:first-child, td:nth-child(3){
|
|
486
|
-
div{ // key icon
|
|
487
|
-
text-align: center;
|
|
488
|
-
padding: 3px;
|
|
489
|
-
border: 1px solid white;
|
|
490
|
-
border-radius: 2px;
|
|
491
|
-
background: rgba(255,255,255,.1);
|
|
492
|
-
font-size: 13px;
|
|
493
|
-
min-width: 21px;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
// a way to do padding for table sides
|
|
498
|
-
td:first-child{ padding-left: 16px; }
|
|
499
|
-
td:last-child{ padding-right: 16px; }
|
|
500
|
-
tr:first-child td{ padding-top: 16px; }
|
|
501
|
-
tr:last-child td{ padding-bottom: 16px; }
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
td{
|
|
506
|
-
vertical-align: middle;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
&.active{
|
|
511
|
-
display: block;
|
|
512
|
-
opacity: 1;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
&.controls-below-player:not(.vjs-controls-disabled).vjs-fullscreen{
|
|
517
|
-
&.vjs-user-inactive.vjs-playing .vjs-text-track-display, .vjs-text-track-display{
|
|
518
|
-
bottom: $controls-height + 10px;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
&.controls-below-player:not(.vjs-fullscreen):not(.vjs-controls-disabled){
|
|
523
|
-
overflow: visible;
|
|
524
|
-
// position: relative;
|
|
525
|
-
width: auto;
|
|
526
|
-
height: auto;
|
|
527
|
-
background-color: transparent;
|
|
528
|
-
margin-bottom: $controls-height + 20px;
|
|
529
|
-
|
|
530
|
-
video{ position: relative;}
|
|
531
|
-
|
|
532
|
-
// .vjs-big-play-button, .vdt-help-overlay{
|
|
533
|
-
// transform: translateY(- $controls-height / 2);
|
|
534
|
-
// }
|
|
535
|
-
|
|
536
|
-
// .vjs-loading-spinner{
|
|
537
|
-
// transform: translateY(-$controls-height / 2);
|
|
538
|
-
// }
|
|
539
|
-
|
|
540
|
-
// .vjs-menu-button-popup .vjs-menu{
|
|
541
|
-
// bottom: 30px;
|
|
542
|
-
// }
|
|
543
|
-
|
|
544
|
-
.vjs-control-bar{
|
|
545
|
-
transform: translate3d(0px, $controls-height + 10px, 0px);
|
|
546
|
-
transition: all 300ms ease-in-out;
|
|
547
|
-
background: transparent;
|
|
548
|
-
|
|
549
|
-
.vjs-button, .vdt-timecode{
|
|
550
|
-
&:not(.vjs-menu-item-text){
|
|
551
|
-
color: #333;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
// when on dark bg
|
|
557
|
-
&.on-dark .vjs-control-bar{
|
|
558
|
-
.vjs-button, .vdt-timecode{
|
|
559
|
-
&:not(.vjs-menu-item-text){
|
|
560
|
-
color: #efefef;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
.vjs-progress-holder{
|
|
566
|
-
margin: 0 auto;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.vjs-menu{
|
|
570
|
-
bottom: 35px;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
.vjs-poster{
|
|
574
|
-
height: initial;
|
|
575
|
-
}
|
|
576
|
-
// .vjs-poster{
|
|
577
|
-
// bottom: $controls-height + 10px;
|
|
578
|
-
// }
|
|
579
|
-
|
|
580
|
-
// .vdt-player-osd{
|
|
581
|
-
// top: initial;
|
|
582
|
-
// bottom: ($controls-height + 10px) / 2;
|
|
583
|
-
// }
|
|
584
|
-
|
|
585
|
-
// .vjs-text-track-display{
|
|
586
|
-
// bottom: $controls-height + 10px;
|
|
587
|
-
// }
|
|
588
|
-
|
|
589
|
-
// &.vjs-user-inactive.vjs-playing .vjs-text-track-display{
|
|
590
|
-
// bottom: $controls-height + 10px;
|
|
591
|
-
// }
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
//remove these from display, best to find options that prevent inserting them in them first place
|
|
596
|
-
.vjs-play-progress:before,
|
|
597
|
-
.vjs-remaining-time,
|
|
598
|
-
.vjs-picture-in-picture-control,
|
|
599
|
-
.vjs-progress-control:hover .vjs-time-tooltips,
|
|
600
|
-
.vjs-play-progress .vjs-time-tooltip,
|
|
601
|
-
.vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip{
|
|
602
|
-
display: none;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
import { docsParameters } from '@vidispine/vdt-storybook';
|
|
4
|
-
|
|
5
|
-
<Meta title="vdt-videojs/Player/Example usage" parameters={docsParameters} />
|
|
6
|
-
|
|
7
|
-
## Example Usage
|
|
8
|
-
|
|
9
|
-
Here's an example how to use the Player class in a pure js way in your project:
|
|
10
|
-
|
|
11
|
-
```js
|
|
12
|
-
import { Player } from '@vidispine/vdt-videojs';
|
|
13
|
-
|
|
14
|
-
const playerReference = new Player({
|
|
15
|
-
target: document.getElementById('player-node'), // HTML mount point
|
|
16
|
-
|
|
17
|
-
sources: [
|
|
18
|
-
{ src: 'https://some.domain/video-file.mp4', type: 'video/mp4' },
|
|
19
|
-
{ src: 'https://some.domain/video-file.webm', type: 'video/webm' },
|
|
20
|
-
],
|
|
21
|
-
|
|
22
|
-
posterUrl: 'https://some.domain/poster-image.jpg', // optional
|
|
23
|
-
color: '#e84393', // optional - replaces primary color
|
|
24
|
-
|
|
25
|
-
subtitles: [
|
|
26
|
-
// optional
|
|
27
|
-
{
|
|
28
|
-
src: 'https://some.domain/video-subtitles.vvt',
|
|
29
|
-
lang: 'en',
|
|
30
|
-
label: 'English',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
src: 'https://some.domain/video-subtitles-es.vvt',
|
|
34
|
-
lang: 'es',
|
|
35
|
-
label: 'Spanish',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
// or use the Blob constructor with file string contents
|
|
39
|
-
src: new Blob(['WEBVTT\n\n\n00:00:00.500(...)'], 'text/plain'),
|
|
40
|
-
lang: 'dk',
|
|
41
|
-
label: 'Danish',
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
|
|
45
|
-
timecode: false, // optional - replaces time display with SMPTE timecode
|
|
46
|
-
frameRate: 24000 / 1001, // optional - use together with timecode option
|
|
47
|
-
|
|
48
|
-
onReady: () => {
|
|
49
|
-
// optional
|
|
50
|
-
// invoke methods after player has done initializing
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
/*
|
|
54
|
-
optional - will add a screenshot button to player
|
|
55
|
-
control bar and invoke method callback on click with player's
|
|
56
|
-
current time in seconds as an argument (from start)
|
|
57
|
-
*/
|
|
58
|
-
onScreenshot: (currentTime) => {
|
|
59
|
-
console.log(currentTime); // -> 0.1280 (current position in s)
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
```
|