@hubspot/video-player-core 0.1.19 → 0.1.21
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/README.md +1 -1
- package/dist/components/TranslationsProvider.d.ts +1 -1
- package/dist/components/VideoFetchProvider.d.ts +1 -1
- package/dist/components/VideoPlayer.d.ts +0 -1
- package/dist/components/VideoPlayerProvider.d.ts +1 -1
- package/dist/index.cjs +2470 -0
- package/dist/index.js +55661 -10
- package/dist/styles/player-theme-styles.d.ts +3 -0
- package/dist/styles/player-theme-styles.d.ts.map +1 -0
- package/package.json +11 -9
- package/dist/api/utils.js +0 -8
- package/dist/api/video.js +0 -22
- package/dist/components/CaptionTracks.js +0 -11
- package/dist/components/HSPlayerIcons.js +0 -14
- package/dist/components/HSThemeTemplate.js +0 -94
- package/dist/components/TranslationsProvider.js +0 -28
- package/dist/components/VideoFetchProvider.js +0 -12
- package/dist/components/VideoPlayer.js +0 -51
- package/dist/components/VideoPlayerProvider.js +0 -162
- package/dist/constants.js +0 -8
- package/dist/hooks/useAsyncEffect.js +0 -54
- package/dist/hooks/useSubtitles.js +0 -17
- package/dist/hooks/useVideo.js +0 -17
- package/dist/styles/mux-player.css +0 -23
- package/dist/styles/player-theme.css +0 -446
- package/dist/types.js +0 -1
- package/dist/utils/i18n.js +0 -79
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
direction: ltr;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
media-controller {
|
|
6
|
-
--media-font-family: 'Lexend Deca', Helvetica, Arial, sans-serif;
|
|
7
|
-
--media-font-weight: 500;
|
|
8
|
-
--media-font-size: 12px;
|
|
9
|
-
--hs-fullscreen-font-size: 17px;
|
|
10
|
-
--hs-tooltip-font-size: 12px;
|
|
11
|
-
font-family: var(--media-font-family);
|
|
12
|
-
font-weight: var(--media-font-weight);
|
|
13
|
-
font-size: var(--media-font-size);
|
|
14
|
-
-webkit-font-smoothing: antialiased;
|
|
15
|
-
|
|
16
|
-
--media-primary-color: #ffffff;
|
|
17
|
-
--media-text-color: #ffffff;
|
|
18
|
-
|
|
19
|
-
--hs-secondary-color: #4b4b4b;
|
|
20
|
-
--hs-secondary-color-translucent: #4b4b4bcc;
|
|
21
|
-
--media-secondary-color: transparent;
|
|
22
|
-
|
|
23
|
-
--media-accent-color: #f7761f;
|
|
24
|
-
--hs-menu-border-color: #aaa;
|
|
25
|
-
--hs-menu-bottom-offset: 40px;
|
|
26
|
-
|
|
27
|
-
--media-menu-background: var(--hs-secondary-color);
|
|
28
|
-
--media-control-hover-background: transparent;
|
|
29
|
-
--media-range-track-height: 3px;
|
|
30
|
-
--media-range-thumb-height: 13px;
|
|
31
|
-
--media-range-thumb-width: 13px;
|
|
32
|
-
--media-range-thumb-border-radius: 13px;
|
|
33
|
-
--media-tooltip-background-color: var(
|
|
34
|
-
--hs-secondary-color,
|
|
35
|
-
rgba(20, 20, 30, 0.7)
|
|
36
|
-
);
|
|
37
|
-
--media-object-fit: cover; /* avoids 1px black bars that tend to occur in safari, depending on exact window & video size */
|
|
38
|
-
position: absolute;
|
|
39
|
-
height: 100%;
|
|
40
|
-
width: 100%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
media-controller[breakpointmd] {
|
|
44
|
-
--media-font-size: 14px;
|
|
45
|
-
--hs-menu-bottom-offset: 50px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/* The biggest size controller is tied to going fullscreen instead of a player width */
|
|
49
|
-
media-controller[mediaisfullscreen] {
|
|
50
|
-
font-size: var(--hs-fullscreen-font-size);
|
|
51
|
-
--media-range-thumb-height: 20px;
|
|
52
|
-
--media-range-thumb-width: 20px;
|
|
53
|
-
--media-range-thumb-border-radius: 10px;
|
|
54
|
-
--media-range-track-height: 4px;
|
|
55
|
-
}
|
|
56
|
-
/* attempt to move captions above the control bar, not working except for Chrome, see https://www.mux.com/blog/if-you-can-read-this-your-browser-captions-are-broken */
|
|
57
|
-
video::-webkit-media-text-track-display {
|
|
58
|
-
transform: translateY(-3em);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.hs-button {
|
|
62
|
-
position: relative;
|
|
63
|
-
display: inline-block;
|
|
64
|
-
width: 36px;
|
|
65
|
-
padding: 0 2px;
|
|
66
|
-
height: 100%;
|
|
67
|
-
opacity: 0.9;
|
|
68
|
-
transition: opacity 0.1s cubic-bezier(0.4, 0, 1, 1);
|
|
69
|
-
--media-font-size: var(--hs-tooltip-font-size);
|
|
70
|
-
}
|
|
71
|
-
[breakpointmd] .hs-button {
|
|
72
|
-
width: 42px;
|
|
73
|
-
}
|
|
74
|
-
[mediaisfullscreen] .hs-button {
|
|
75
|
-
width: 54px;
|
|
76
|
-
--hs-tooltip-font-size: 14px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.hs-button svg {
|
|
80
|
-
height: 100%;
|
|
81
|
-
width: 100%;
|
|
82
|
-
fill: var(--media-primary-color);
|
|
83
|
-
fill-rule: evenodd;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.svg-shadow {
|
|
87
|
-
stroke: #000;
|
|
88
|
-
stroke-opacity: 0.15;
|
|
89
|
-
stroke-width: 2px;
|
|
90
|
-
fill: none;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Big centered Play/Pause */
|
|
94
|
-
media-play-button.centered-play-button,
|
|
95
|
-
media-pause-button.centered-play-button {
|
|
96
|
-
position: absolute;
|
|
97
|
-
display: flex;
|
|
98
|
-
justify-content: center;
|
|
99
|
-
align-items: center;
|
|
100
|
-
height: 25%;
|
|
101
|
-
aspect-ratio: 1;
|
|
102
|
-
padding: 0;
|
|
103
|
-
z-index: 1;
|
|
104
|
-
border-radius: 50%;
|
|
105
|
-
opacity: 0;
|
|
106
|
-
--media-control-background: var(--media-accent-color);
|
|
107
|
-
--media-control-hover-background: var(--media-accent-color);
|
|
108
|
-
--media-tooltip-display: none;
|
|
109
|
-
}
|
|
110
|
-
[mediapaused] media-play-button.centered-play-button {
|
|
111
|
-
opacity: 1;
|
|
112
|
-
transition: opacity 0.3s ease-in;
|
|
113
|
-
}
|
|
114
|
-
.centered-play-button svg {
|
|
115
|
-
position: absolute;
|
|
116
|
-
height: 80%;
|
|
117
|
-
fill: var(--hs-secondary-color);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* Error Dialog */
|
|
121
|
-
media-error-dialog {
|
|
122
|
-
--media-control-background: rgba(255, 255, 255, 0.7);
|
|
123
|
-
z-index: 2;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/* Gradient */
|
|
127
|
-
.hs-control-bar-background {
|
|
128
|
-
position: absolute;
|
|
129
|
-
display: flex;
|
|
130
|
-
flex-direction: column;
|
|
131
|
-
left: 10px;
|
|
132
|
-
right: 10px;
|
|
133
|
-
bottom: 10px;
|
|
134
|
-
background-color: var(--hs-secondary-color-translucent);
|
|
135
|
-
border-radius: 5px;
|
|
136
|
-
padding-top: 3px;
|
|
137
|
-
}
|
|
138
|
-
.hs-bottom-gradient {
|
|
139
|
-
position: absolute;
|
|
140
|
-
width: 100%;
|
|
141
|
-
height: 100%;
|
|
142
|
-
bottom: 0;
|
|
143
|
-
pointer-events: none;
|
|
144
|
-
box-shadow: inset 0 -24px 8px -8px rgba(30, 30, 30, 0.3),
|
|
145
|
-
inset 0 -48px 16px -16px rgba(60, 60, 60, 0.25);
|
|
146
|
-
border-radius: 5px;
|
|
147
|
-
}
|
|
148
|
-
[data-theme-variant='light'].hs-bottom-gradient {
|
|
149
|
-
box-shadow: inset 0 -24px 8px -8px rgba(210, 210, 210, 0.3),
|
|
150
|
-
inset 0 -48px 16px -16px rgba(250, 250, 250, 0.25);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/* Settings Menu - media-settings-menu and media-captions menu are at bottom, or else they cannot be clicked and the player toggles play/pause instead */
|
|
154
|
-
media-settings-menu {
|
|
155
|
-
position: absolute;
|
|
156
|
-
background-color: var(--hs-secondary-color-translucent);
|
|
157
|
-
border: 1px solid var(--hs-menu-border-color);
|
|
158
|
-
border-radius: 5px;
|
|
159
|
-
right: 12px;
|
|
160
|
-
bottom: var(--hs-menu-bottom-offset);
|
|
161
|
-
z-index: 10;
|
|
162
|
-
will-change: width, height;
|
|
163
|
-
transition: opacity 0.1s cubic-bezier(0, 0, 0.2, 1);
|
|
164
|
-
user-select: none;
|
|
165
|
-
--media-settings-menu-min-width: 220px;
|
|
166
|
-
}
|
|
167
|
-
[mediaisfullscreen] media-settings-menu {
|
|
168
|
-
--media-settings-menu-min-width: 320px;
|
|
169
|
-
right: 24px;
|
|
170
|
-
bottom: 70px;
|
|
171
|
-
}
|
|
172
|
-
media-settings-menu-item {
|
|
173
|
-
height: 40px;
|
|
174
|
-
font-weight: var(--media-font-weight);
|
|
175
|
-
padding-top: 0;
|
|
176
|
-
padding-bottom: 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
[mediaisfullscreen] media-settings-menu-item {
|
|
180
|
-
font-size: var(--hs-fullscreen-font-size);
|
|
181
|
-
height: 50px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
media-settings-menu-item[submenusize='0'] {
|
|
185
|
-
display: none;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* Also hide if only 'Auto' is added. */
|
|
189
|
-
.quality-settings[submenusize='1'] {
|
|
190
|
-
display: none;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
media-captions-menu {
|
|
194
|
-
position: absolute;
|
|
195
|
-
background-color: var(--hs-secondary-color-translucent);
|
|
196
|
-
border: 1px solid var(--hs-menu-border-color);
|
|
197
|
-
border-radius: 5px;
|
|
198
|
-
bottom: var(--hs-menu-bottom-offset);
|
|
199
|
-
right: 70px;
|
|
200
|
-
z-index: 10;
|
|
201
|
-
will-change: width, height;
|
|
202
|
-
transition: opacity 0.1s cubic-bezier(0, 0, 0.2, 1);
|
|
203
|
-
user-select: none;
|
|
204
|
-
}
|
|
205
|
-
[mediaisfullscreen] media-captions-menu {
|
|
206
|
-
bottom: var(--hs-menu-bottom-offset);
|
|
207
|
-
font-size: var(--hs-fullscreen-font-size);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/* Time Range / Progress Bar */
|
|
211
|
-
media-time-range {
|
|
212
|
-
width: calc(100% + 10px);
|
|
213
|
-
height: 8px;
|
|
214
|
-
left: -5px;
|
|
215
|
-
z-index: 2;
|
|
216
|
-
--media-range-track-background: rgba(155, 155, 155, 0.5);
|
|
217
|
-
--media-range-track-pointer-background: rgba(155, 155, 155, 0.5);
|
|
218
|
-
--media-range-track-height: 6px;
|
|
219
|
-
--media-range-track-border-radius: 4px;
|
|
220
|
-
--media-box-border-radius: 4px;
|
|
221
|
-
--media-time-range-buffered-color: rgba(255, 255, 255, 0.4);
|
|
222
|
-
--media-range-bar-color: var(--media-accent-color);
|
|
223
|
-
|
|
224
|
-
--media-range-thumb-border-radius: 13px;
|
|
225
|
-
--media-range-thumb-background: var(--media-accent-color);
|
|
226
|
-
--media-range-thumb-transition: transform 0.1s linear;
|
|
227
|
-
--media-range-thumb-transform: scale(0) translate(0%, 0%);
|
|
228
|
-
|
|
229
|
-
--media-preview-thumbnail-border: 2px solid transparent;
|
|
230
|
-
--media-preview-thumbnail-border-radius: 4px;
|
|
231
|
-
--media-preview-chapter-text-shadow: none;
|
|
232
|
-
--media-preview-time-text-shadow: none;
|
|
233
|
-
--media-preview-thumbnail-background: var(--hs-secondary-color);
|
|
234
|
-
--media-preview-chapter-background: var(--hs-secondary-color);
|
|
235
|
-
--media-preview-time-background: var(--hs-secondary-color);
|
|
236
|
-
}
|
|
237
|
-
media-time-range:hover {
|
|
238
|
-
--media-range-thumb-transform: scale(1) translate(0%, 0%);
|
|
239
|
-
}
|
|
240
|
-
[mediaisfullscreen] media-time-range:hover {
|
|
241
|
-
--media-range-track-height: 8px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
media-preview-thumbnail {
|
|
245
|
-
background-color: var(--hs-secondary-color);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* Control Bar */
|
|
249
|
-
media-control-bar {
|
|
250
|
-
position: relative;
|
|
251
|
-
height: 30px;
|
|
252
|
-
line-height: 30px;
|
|
253
|
-
top: -2px;
|
|
254
|
-
}
|
|
255
|
-
[breakpointmd] media-control-bar {
|
|
256
|
-
height: 40px;
|
|
257
|
-
line-height: 40px;
|
|
258
|
-
}
|
|
259
|
-
[mediaisfullscreen] media-control-bar {
|
|
260
|
-
height: 54px;
|
|
261
|
-
line-height: 54px;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/* Play/Pause */
|
|
265
|
-
/* Slow down the play icon part hiding slightly to achieve the morphing look a little better */
|
|
266
|
-
media-play-button:not([mediapaused]) #play-p2,
|
|
267
|
-
media-play-button:not([mediapaused]) #play-p2 {
|
|
268
|
-
transition: clip-path 0.35s ease-in;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/* Show icon */
|
|
272
|
-
media-play-button :is(#pause-p1, #pause-p2),
|
|
273
|
-
media-play-button[mediapaused] :is(#play-p1, #play-p2) {
|
|
274
|
-
clip-path: inset(0);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/* Hide icon wth clip path mask */
|
|
278
|
-
media-play-button #play-p1 {
|
|
279
|
-
clip-path: inset(0 100% 0 0);
|
|
280
|
-
}
|
|
281
|
-
media-play-button #play-p2 {
|
|
282
|
-
clip-path: inset(0 20% 0 100%);
|
|
283
|
-
}
|
|
284
|
-
media-play-button[mediapaused] #pause-p1 {
|
|
285
|
-
clip-path: inset(50% 0 50% 0);
|
|
286
|
-
}
|
|
287
|
-
media-play-button[mediapaused] #pause-p2 {
|
|
288
|
-
clip-path: inset(50% 0 50% 0);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/* Volume/Mute */
|
|
292
|
-
media-mute-button svg {
|
|
293
|
-
transform: scale(0.7);
|
|
294
|
-
stroke: var(--media-primary-color);
|
|
295
|
-
stroke-width: 0.75px;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
media-mute-button :is(#icon-muted, #icon-volume) {
|
|
299
|
-
transition: clip-path 0.3s ease-out;
|
|
300
|
-
}
|
|
301
|
-
media-mute-button #icon-muted {
|
|
302
|
-
clip-path: inset(0 0 100% 0);
|
|
303
|
-
}
|
|
304
|
-
media-mute-button[mediavolumelevel='off'] #icon-muted {
|
|
305
|
-
clip-path: inset(0);
|
|
306
|
-
}
|
|
307
|
-
media-mute-button #icon-volume {
|
|
308
|
-
clip-path: inset(0);
|
|
309
|
-
}
|
|
310
|
-
media-mute-button[mediavolumelevel='off'] #icon-volume {
|
|
311
|
-
clip-path: inset(100% 0 0 0);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
media-mute-button #volume-high,
|
|
315
|
-
media-mute-button[mediavolumelevel='off'] #volume-high {
|
|
316
|
-
opacity: 1;
|
|
317
|
-
transition: opacity 0.3s;
|
|
318
|
-
}
|
|
319
|
-
media-mute-button[mediavolumelevel='low'] #volume-high,
|
|
320
|
-
media-mute-button[mediavolumelevel='medium'] #volume-high {
|
|
321
|
-
opacity: 0.2;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
media-controller .media-volume-wrapper {
|
|
325
|
-
position: relative;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.media-volume-range-wrapper {
|
|
329
|
-
position: absolute;
|
|
330
|
-
top: -4.25rem;
|
|
331
|
-
left: -1.75rem;
|
|
332
|
-
height: 40px;
|
|
333
|
-
width: 100px;
|
|
334
|
-
opacity: 0;
|
|
335
|
-
transform: rotate(-90deg);
|
|
336
|
-
z-index: 5;
|
|
337
|
-
}
|
|
338
|
-
.media-volume-range-inner {
|
|
339
|
-
position: relative;
|
|
340
|
-
top: 0;
|
|
341
|
-
bottom: 0;
|
|
342
|
-
right: 0;
|
|
343
|
-
left: 12px; /* achieves proper vertical alignment of other popup menus, while ensuring you can move cursor up after hovering on mute button without dismissing */
|
|
344
|
-
background-color: var(--hs-secondary-color-translucent);
|
|
345
|
-
border: 1px solid var(--hs-menu-border-color);
|
|
346
|
-
border-radius: 5px;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
media-mute-button:hover + .media-volume-range-wrapper,
|
|
350
|
-
media-mute-button:focus + .media-volume-range-wrapper,
|
|
351
|
-
media-mute-button:focus-within + .media-volume-range-wrapper,
|
|
352
|
-
.media-volume-range-wrapper:hover,
|
|
353
|
-
.media-volume-range-wrapper:focus,
|
|
354
|
-
.media-volume-range-wrapper:focus-within {
|
|
355
|
-
opacity: 1;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
media-volume-range {
|
|
359
|
-
height: 100%;
|
|
360
|
-
width: 100%;
|
|
361
|
-
vertical-align: middle;
|
|
362
|
-
--media-range-track-background: var(--media-primary-color);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/* Time Display */
|
|
366
|
-
media-time-display {
|
|
367
|
-
padding-top: 6px;
|
|
368
|
-
padding-bottom: 6px;
|
|
369
|
-
padding-left: 0;
|
|
370
|
-
}
|
|
371
|
-
[mediaisfullscreen] media-time-display {
|
|
372
|
-
font-size: var(--hs-fullscreen-font-size);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/* Control spacer */
|
|
376
|
-
.control-spacer {
|
|
377
|
-
flex-grow: 1;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/* Subtitles/CC Button */
|
|
381
|
-
media-captions-button {
|
|
382
|
-
position: relative;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
media-captions-menu-button svg {
|
|
386
|
-
transform: scale(0.7);
|
|
387
|
-
stroke: var(--media-primary-color);
|
|
388
|
-
stroke-width: 0.5px;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/* Hide the captions menu button when no subtitles are available */
|
|
392
|
-
media-captions-menu-button:not([mediasubtitleslist]) {
|
|
393
|
-
display: none;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/* Disble the captions button when no subtitles are available */
|
|
397
|
-
media-captions-button:not([mediasubtitleslist]) svg {
|
|
398
|
-
opacity: 0.3;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
media-captions-button[mediasubtitleslist]:after {
|
|
402
|
-
content: '';
|
|
403
|
-
display: block;
|
|
404
|
-
position: absolute;
|
|
405
|
-
width: 0;
|
|
406
|
-
height: 3px;
|
|
407
|
-
border-radius: 3px;
|
|
408
|
-
background-color: var(--media-accent-color);
|
|
409
|
-
bottom: 19%;
|
|
410
|
-
left: 50%;
|
|
411
|
-
transition: all 0.1s cubic-bezier(0, 0, 0.2, 1),
|
|
412
|
-
width 0.1s cubic-bezier(0, 0, 0.2, 1);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
media-captions-button[mediasubtitleslist][aria-checked='true']:after {
|
|
416
|
-
left: 25%;
|
|
417
|
-
width: 50%;
|
|
418
|
-
transition: left 0.25s cubic-bezier(0, 0, 0.2, 1),
|
|
419
|
-
width 0.25s cubic-bezier(0, 0, 0.2, 1);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
media-captions-button[mediasubtitleslist][aria-checked='true']:after {
|
|
423
|
-
left: 25%;
|
|
424
|
-
width: 50%;
|
|
425
|
-
|
|
426
|
-
transition: left 0.25s cubic-bezier(0, 0, 0.2, 1),
|
|
427
|
-
width 0.25s cubic-bezier(0, 0, 0.2, 1);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/* Settings Menu Button */
|
|
431
|
-
media-settings-menu-button svg {
|
|
432
|
-
stroke: var(--media-primary-color);
|
|
433
|
-
stroke-width: 1px;
|
|
434
|
-
transition: transform 0.1s cubic-bezier(0.4, 0, 1, 1);
|
|
435
|
-
transform: scale(0.55) rotateZ(0deg);
|
|
436
|
-
}
|
|
437
|
-
media-settings-menu-button[aria-expanded='true'] svg {
|
|
438
|
-
stroke: var(--media-primary-color);
|
|
439
|
-
stroke-width: 0.5px;
|
|
440
|
-
transform: scale(0.55) rotateZ(30deg);
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/* Fullscreen Button */
|
|
444
|
-
media-fullscreen-button[mediaisfullscreen] svg {
|
|
445
|
-
transform: scale(0.6);
|
|
446
|
-
}
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/utils/i18n.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_LANGUAGE = 'en';
|
|
2
|
-
export const DEFAULT_TRANSLATIONS = {
|
|
3
|
-
play: 'Play',
|
|
4
|
-
pause: 'Pause',
|
|
5
|
-
mute: 'Mute',
|
|
6
|
-
unmute: 'Unmute',
|
|
7
|
-
captions: 'Captions',
|
|
8
|
-
settings: 'Settings',
|
|
9
|
-
playbackSpeed: 'Playback speed',
|
|
10
|
-
quality: 'Quality',
|
|
11
|
-
auto: 'Auto',
|
|
12
|
-
off: 'Off',
|
|
13
|
-
enterFullscreen: 'Enter fullscreen mode',
|
|
14
|
-
exitFullscreen: 'Exit fullscreen mode',
|
|
15
|
-
enterPipMode: 'Enter picture-in-picture mode',
|
|
16
|
-
exitPipMode: 'Exit picture-in-picture mode',
|
|
17
|
-
seek: 'Seek',
|
|
18
|
-
playbackTime: 'playback time',
|
|
19
|
-
videoPlayer: 'video player',
|
|
20
|
-
audioPlayer: 'audio player',
|
|
21
|
-
loading: 'media loading',
|
|
22
|
-
closedCaptions: 'closed captions',
|
|
23
|
-
networkError: 'Network Error',
|
|
24
|
-
decodeError: 'Decode Error',
|
|
25
|
-
sourceNotSupported: 'Source Not Supported',
|
|
26
|
-
encryptionError: 'Encryption Error',
|
|
27
|
-
networkErrorMessage: 'A network error caused the media download to fail.',
|
|
28
|
-
decodeErrorMessage: 'A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.',
|
|
29
|
-
unsupportedErrorMessage: 'An unsupported error occurred. The server or network failed, or your browser does not support this format.',
|
|
30
|
-
encryptionErrorMessage: 'The media is encrypted and there are no keys to decrypt it.',
|
|
31
|
-
// overlays
|
|
32
|
-
watchVideo: 'Watch video',
|
|
33
|
-
defaultInlineMessage: 'Thanks for your response!',
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Create map of media-chrome's i18n keys to string values of the provided translations object
|
|
37
|
-
* https://www.media-chrome.org/docs/en/internationalization/adding-language-support
|
|
38
|
-
*/
|
|
39
|
-
export const createTranslationsMap = (translations) => {
|
|
40
|
-
return {
|
|
41
|
-
Play: translations.play,
|
|
42
|
-
play: translations.play,
|
|
43
|
-
Pause: translations.pause,
|
|
44
|
-
pause: translations.pause,
|
|
45
|
-
Mute: translations.mute,
|
|
46
|
-
mute: translations.mute,
|
|
47
|
-
Unmute: translations.unmute,
|
|
48
|
-
unmute: translations.unmute,
|
|
49
|
-
Off: translations.off,
|
|
50
|
-
Captions: translations.captions,
|
|
51
|
-
'Playback rate': translations.playbackSpeed,
|
|
52
|
-
'playback time': translations.playbackTime,
|
|
53
|
-
Quality: translations.quality,
|
|
54
|
-
quality: translations.quality,
|
|
55
|
-
'Enter fullscreen mode': translations.enterFullscreen,
|
|
56
|
-
'enter fullscreen mode': translations.enterFullscreen,
|
|
57
|
-
'Exit fullscreen mode': translations.exitFullscreen,
|
|
58
|
-
'exit fullscreen mode': translations.exitFullscreen,
|
|
59
|
-
'Enter picture in picture mode': translations.enterPipMode,
|
|
60
|
-
'enter picture in picture mode': translations.enterPipMode,
|
|
61
|
-
'Exit picture in picture mode': translations.exitPipMode,
|
|
62
|
-
'exit picture in picture mode': translations.exitPipMode,
|
|
63
|
-
Settings: translations.settings,
|
|
64
|
-
settings: translations.settings,
|
|
65
|
-
Auto: translations.auto,
|
|
66
|
-
'video player': translations.videoPlayer,
|
|
67
|
-
'audio player': translations.audioPlayer,
|
|
68
|
-
'media loading': translations.loading,
|
|
69
|
-
'closed captions': translations.closedCaptions,
|
|
70
|
-
'Network Error': translations.networkError,
|
|
71
|
-
'Decode Error': translations.decodeError,
|
|
72
|
-
'Source Not Supported': translations.sourceNotSupported,
|
|
73
|
-
'Encryption Error': translations.encryptionError,
|
|
74
|
-
'A network error caused the media download to fail.': translations.networkErrorMessage,
|
|
75
|
-
'A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.': translations.decodeErrorMessage,
|
|
76
|
-
'An unsupported error occurred. The server or network failed, or your browser does not support this format.': translations.unsupportedErrorMessage,
|
|
77
|
-
'The media is encrypted and there are no keys to decrypt it.': translations.encryptionErrorMessage,
|
|
78
|
-
};
|
|
79
|
-
};
|