@eluvio/elv-player-js 1.0.140 → 2.0.1

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.
Files changed (102) hide show
  1. package/README.md +35 -6
  2. package/dist/.vite/manifest.json +67 -0
  3. package/dist/Analytics-HWXR7tWt.mjs +2028 -0
  4. package/dist/Analytics-IUVysdzU.js +29 -0
  5. package/dist/dash.all.min-1QS9Xbir.js +25 -0
  6. package/dist/dash.all.min-9V1xYBRv.mjs +19428 -0
  7. package/dist/elv-player-js.cjs.js +1 -0
  8. package/dist/elv-player-js.css +1 -0
  9. package/dist/elv-player-js.es.js +5 -0
  10. package/dist/hls-1eCRapWm.mjs +15461 -0
  11. package/dist/hls-6O5SV1FQ.js +26 -0
  12. package/dist/index-6cMQneJf.mjs +2273 -0
  13. package/dist/index-C8mwW09z.js +23 -0
  14. package/dist/index-J4QpmTkA.js +367 -0
  15. package/dist/index-hvQzQ6UX.mjs +67432 -0
  16. package/lib/index.js +7 -0
  17. package/{src → lib/player}/Analytics.js +9 -8
  18. package/lib/player/Controls.js +913 -0
  19. package/{src → lib/player}/FairPlay.js +2 -0
  20. package/lib/player/Player.js +881 -0
  21. package/lib/player/PlayerParameters.js +173 -0
  22. package/lib/static/icons/Icons.js +29 -0
  23. package/lib/static/icons/svgs/backward-circle.svg +5 -0
  24. package/lib/static/icons/svgs/backward.svg +4 -0
  25. package/lib/static/icons/svgs/captions-off.svg +7 -0
  26. package/lib/static/icons/svgs/captions.svg +6 -0
  27. package/lib/static/icons/svgs/check.svg +1 -0
  28. package/lib/static/icons/svgs/chevron-left.svg +1 -0
  29. package/lib/static/icons/svgs/chevron-right.svg +1 -0
  30. package/lib/static/icons/svgs/forward-circle.svg +5 -0
  31. package/lib/static/icons/svgs/forward.svg +4 -0
  32. package/{src/static/icons/media/Full Screen icon.svg → lib/static/icons/svgs/full-screen.svg} +1 -1
  33. package/lib/static/icons/svgs/large-play-circle.svg +4 -0
  34. package/lib/static/icons/svgs/list.svg +1 -0
  35. package/{src/static/icons → lib/static/icons/svgs}/minimize.svg +1 -1
  36. package/{src/static/icons/media/Pause icon.svg → lib/static/icons/svgs/pause-circle.svg} +3 -3
  37. package/lib/static/icons/svgs/pause.svg +1 -0
  38. package/{src/static/icons/media/Play icon.svg → lib/static/icons/svgs/play-circle.svg} +1 -1
  39. package/lib/static/icons/svgs/play.svg +1 -0
  40. package/lib/static/icons/svgs/rotate-cw.svg +1 -0
  41. package/lib/static/icons/svgs/settings.svg +11 -0
  42. package/{src/static/icons/media/skip back icon.svg → lib/static/icons/svgs/skip-backward.svg} +2 -3
  43. package/{src/static/icons/media/Skip forward icon.svg → lib/static/icons/svgs/skip-forward.svg} +2 -3
  44. package/{src/static/icons/media/Volume icon.svg → lib/static/icons/svgs/volume-high.svg} +3 -3
  45. package/lib/static/icons/svgs/volume-low.svg +10 -0
  46. package/{src/static/icons/media/low volume icon.svg → lib/static/icons/svgs/volume-medium.svg} +2 -2
  47. package/{src/static/icons/media/no volume icon.svg → lib/static/icons/svgs/volume-off.svg} +3 -3
  48. package/lib/static/stylesheets/common.module.scss +486 -0
  49. package/lib/static/stylesheets/controls-tv.module.scss +488 -0
  50. package/lib/static/stylesheets/controls-web.module.scss +422 -0
  51. package/lib/static/stylesheets/player-profile-form.module.scss +141 -0
  52. package/lib/static/stylesheets/player.module.scss +92 -0
  53. package/lib/static/stylesheets/reset.module.scss +79 -0
  54. package/lib/static/stylesheets/ticket-form.module.scss +123 -0
  55. package/lib/ui/BuildIcons.cjs +44 -0
  56. package/lib/ui/Common.js +210 -0
  57. package/lib/ui/Components.jsx +342 -0
  58. package/lib/ui/Observers.js +449 -0
  59. package/lib/ui/PlayerProfileForm.jsx +106 -0
  60. package/lib/ui/PlayerUI.jsx +317 -0
  61. package/lib/ui/TVControls.jsx +337 -0
  62. package/lib/ui/TicketForm.jsx +147 -0
  63. package/lib/ui/WebControls.jsx +290 -0
  64. package/package.json +35 -47
  65. package/dist/index.js +0 -2
  66. package/dist/index.js.LICENSE.txt +0 -80
  67. package/src/BuildIcons.js +0 -27
  68. package/src/PlayerControls.js +0 -1478
  69. package/src/index.js +0 -1417
  70. package/src/static/icons/Icons.js +0 -15
  71. package/src/static/icons/Settings icon.svg +0 -4
  72. package/src/static/icons/chat icon collapse.svg +0 -1
  73. package/src/static/icons/chat icon.svg +0 -11
  74. package/src/static/icons/chat send.svg +0 -1
  75. package/src/static/icons/full screen.svg +0 -1
  76. package/src/static/icons/media/LargePlayIcon.svg +0 -4
  77. package/src/static/icons/media/Settings icon.svg +0 -4
  78. package/src/static/icons/media/Skip backward icon.svg +0 -4
  79. package/src/static/icons/media/list.svg +0 -1
  80. package/src/static/icons/media/loop icon.svg +0 -12
  81. package/src/static/icons/media/shuffle icon.svg +0 -13
  82. package/src/static/icons/muted.svg +0 -11
  83. package/src/static/icons/pause.svg +0 -1
  84. package/src/static/icons/play circle.svg +0 -1
  85. package/src/static/icons/play.svg +0 -1
  86. package/src/static/icons/settings.svg +0 -1
  87. package/src/static/icons/slider circle.svg +0 -1
  88. package/src/static/icons/unmuted.svg +0 -10
  89. package/src/static/images/ELUV.IO logo embed player.png +0 -0
  90. package/src/static/images/ELUV.IO logo embed player.svg +0 -1
  91. package/src/static/images/ELUV.IO white 20 px V2.png +0 -0
  92. package/src/static/images/ELUVIO white.svg +0 -26
  93. package/src/static/images/Logo.png +0 -0
  94. package/src/static/stylesheets/player.scss +0 -1065
  95. package/webpack.config.js +0 -152
  96. /package/{src/static/icons → lib/static/icons/svgs}/arrow-left.svg +0 -0
  97. /package/{src/static/icons/live icon.svg → lib/static/icons/svgs/live.svg} +0 -0
  98. /package/{src/static/icons → lib/static/icons/svgs}/multiview.svg +0 -0
  99. /package/{src/static/icons/media → lib/static/icons/svgs}/next.svg +0 -0
  100. /package/{src/static/icons/media → lib/static/icons/svgs}/previous.svg +0 -0
  101. /package/{src/static/icons → lib/static/icons/svgs}/x.svg +0 -0
  102. /package/{dist/5897e28fa3e8ac0a2fae.png → lib/static/images/Logo.png} +0 -0
@@ -0,0 +1,486 @@
1
+ .spinner {
2
+ --color-highlight: 55, 132, 235;
3
+
4
+ animation: spin 1.5s ease infinite;
5
+ aspect-ratio: 1;
6
+ border: 6px solid rgba(#FFF, 30%);
7
+ border-radius: 100%;
8
+ border-top-color: #FFF;
9
+ display: inline-block;
10
+ height: 100%;
11
+ width: auto;
12
+
13
+ &--light {
14
+ border-width: 3px;
15
+ }
16
+ }
17
+
18
+ .svg {
19
+ align-items: center;
20
+ display: flex;
21
+ height: 100%;
22
+ justify-content: center;
23
+ }
24
+
25
+ .user-action-indicator-container {
26
+ align-items: center;
27
+ animation: action-indicator-fade-out 0.55s ease;
28
+ color: #FFF;
29
+ display: flex;
30
+ flex-direction: column;
31
+ gap: 30px;
32
+ height: 100%;
33
+ inset: 0;
34
+ justify-content: center;
35
+ opacity: 0;
36
+ pointer-events: none;
37
+ position: absolute;
38
+ user-select: none;
39
+ width: 100%;
40
+ }
41
+
42
+ .user-action-indicator-text {
43
+ align-items: center;
44
+ background: rgba(0, 0, 0, 50%);
45
+ border-radius: 5px;
46
+ display: flex;
47
+ font-size: 12px;
48
+ font-weight: 600;
49
+ justify-content: center;
50
+ padding: 10px 15px;
51
+ width: max-content;
52
+ }
53
+
54
+ .user-action-indicator {
55
+ animation: action-indicator-icon-scale 0.5s ease;
56
+ background: rgba(0, 0, 0, 50%);
57
+ border-radius: 100%;
58
+ height: 75px;
59
+ width: 75px;
60
+ }
61
+
62
+ .user-action-indicator-icon {
63
+ padding: 22px;
64
+
65
+ svg {
66
+ height: 100%;
67
+ width: 100%;
68
+ }
69
+ }
70
+
71
+
72
+ /* Seek Bar */
73
+
74
+ .seek-container {
75
+ --progress-height: 3px;
76
+ --progress-height-expanded: 10px;
77
+ --progress-height-expanded-mobile: 15px;
78
+ --color-seek-background: rgba(255, 255, 255, 10%);
79
+ --color-seek-buffer: rgba(255, 255, 255, 10%);
80
+ --color-seek-active: rgba(255, 255, 255, 50%);
81
+ --color-seek-active-focused: #FFF;
82
+
83
+ align-items: center;
84
+ display: flex;
85
+ height: calc(var(--progress-height-expanded) + 10px);
86
+ position: relative;
87
+ transition: height 0.25s ease, opacity 0.25s ease, border-radius 1.25s ease, filter 0.25s ease;
88
+ transition-delay: 0.25s;
89
+ width: 100%;
90
+
91
+ * {
92
+ transition: height 0.25s ease, width 0.25s ease, opacity 0.25s ease, border-radius 0.25s ease;
93
+ transition-delay: 0.25s;
94
+ }
95
+
96
+ &:hover,
97
+ &:active,
98
+ &:focus,
99
+ &:focus-visible,
100
+ &:has(:focus-visible) {
101
+ transition-delay: unset;
102
+
103
+ .seek-playhead,
104
+ .seek-buffer,
105
+ .seek-input {
106
+ height: var(--progress-height-expanded);
107
+ transition-delay: unset;
108
+ }
109
+
110
+ .seek-playhead {
111
+ &::-webkit-progress-value {
112
+ background-color: var(--color-seek-active-focused);
113
+ transition-delay: unset;
114
+ }
115
+
116
+ &::-moz-progress-bar {
117
+ background-color: var(--color-seek-active-focused);
118
+ transition-delay: unset;
119
+ }
120
+ }
121
+
122
+ ::-webkit-slider-thumb {
123
+ height: var(--progress-height-expanded);
124
+ transition-delay: unset;
125
+ }
126
+
127
+ ::-moz-range-thumb {
128
+ height: var(--progress-height-expanded);
129
+ transition-delay: unset;
130
+ }
131
+ }
132
+
133
+ &:focus-visible,
134
+ &:has(:focus-visible),
135
+ &:hover {
136
+ filter: drop-shadow(0 0 5px var(--color-seek-active-focused));
137
+ }
138
+ }
139
+
140
+ .seek-playhead,
141
+ .seek-buffer,
142
+ .seek-input {
143
+ border-radius: 4px;
144
+ height: var(--progress-height);
145
+ left: 0;
146
+ overflow: hidden;
147
+ position: absolute;
148
+ width: 100%;
149
+ }
150
+
151
+ .seek-playhead {
152
+ background: transparent;
153
+
154
+ &::-webkit-progress-bar {
155
+ background: transparent;
156
+ }
157
+
158
+ &::-webkit-progress-value {
159
+ background-color: var(--color-seek-active);
160
+ transition: background-color 0.5s ease;
161
+ transition-delay: 0.25s;
162
+ }
163
+
164
+ &::-moz-progress-bar {
165
+ background-color: var(--color-seek-active);
166
+ transition: background-color 0.5s ease;
167
+ transition-delay: 0.25s;
168
+ }
169
+ }
170
+
171
+ .seek-buffer {
172
+ background: var(--color-seek-background);
173
+
174
+ &::-webkit-progress-bar {
175
+ background: transparent;
176
+ }
177
+
178
+ &::-webkit-progress-value {
179
+ background-color: var(--color-seek-buffer);
180
+ }
181
+
182
+ &::-moz-progress-bar {
183
+ background-color: var(--color-seek-buffer);
184
+ }
185
+ }
186
+
187
+ .seek-input {
188
+ appearance: none;
189
+ cursor: pointer;
190
+ width: 100%;
191
+ z-index: 10000;
192
+
193
+ &::-webkit-slider-runnable-track {
194
+ background: transparent;
195
+ }
196
+
197
+ &::-webkit-slider-thumb {
198
+ appearance: none;
199
+ background-color: var(--color-seek-indicator);
200
+ border: 0;
201
+ border-radius: 5px;
202
+ height: var(--progress-height);
203
+ transition: height 0.25s ease, width 0.25s ease, opacity 0.25s ease, border-radius 0.25s ease;
204
+ transition-delay: 0.25s;
205
+ width: var(--progress-height);
206
+ }
207
+
208
+ &::-moz-range-track {
209
+ background: transparent;
210
+ }
211
+
212
+ &::-moz-range-thumb {
213
+ appearance: none;
214
+ background-color: var(--color-seek-indicator);
215
+ border: 0;
216
+ border-radius: 5px;
217
+ height: var(--progress-height);
218
+ transition: height 0.25s ease, width 0.25s ease, opacity 0.25s ease, border-radius 0.25s ease;
219
+ transition-delay: 0.25s;
220
+ width: var(--progress-height);
221
+ }
222
+ }
223
+
224
+ /* Volume */
225
+
226
+
227
+ .volume-controls {
228
+ --color-volume-background: rgba(255, 255, 255, 20%);
229
+ --color-volume-active: #fff;
230
+
231
+ align-items: center;
232
+ display: flex;
233
+ height: 100%;
234
+
235
+ &:hover,
236
+ &:focus-visible,
237
+ &:focus,
238
+ &:active,
239
+ &:has(:focus-visible),
240
+ &:has(:focus),
241
+ &:has(:active) {
242
+ .volume-slider {
243
+ margin-left: 5px !important;
244
+ width: 80px;
245
+ }
246
+ }
247
+ }
248
+
249
+ .volume-slider {
250
+ align-items: center;
251
+ border-radius: 10px;
252
+ display: flex;
253
+ height: 10px;
254
+ overflow: hidden;
255
+ position: relative;
256
+ transition: width 0.25s ease, margin 0.25s ease;
257
+ width: 0;
258
+ }
259
+
260
+ .volume-input,
261
+ .volume-progress {
262
+ height: 100%;
263
+ left: 0;
264
+ position: absolute;
265
+ width: 100%;
266
+ }
267
+
268
+ .volume-progress {
269
+ background: var(--color-volume-background);
270
+ height: 3px;
271
+
272
+ &::-webkit-progress-bar {
273
+ background: transparent;
274
+ }
275
+
276
+ &::-webkit-progress-value {
277
+ background-color: var(--color-volume-active);
278
+ }
279
+
280
+ &::-moz-progress-bar {
281
+ background-color: var(--color-volume-active);
282
+ }
283
+ }
284
+
285
+ .volume-input {
286
+ appearance: none;
287
+ cursor: pointer;
288
+ height: 100%;
289
+ width: 100%;
290
+
291
+ &:focus-visible {
292
+ border: 1px solid var(--color-highlight);
293
+ }
294
+
295
+ &::-webkit-slider-runnable-track {
296
+ background: transparent;
297
+ }
298
+
299
+ &::-webkit-slider-thumb {
300
+ appearance: none;
301
+ background: transparent;
302
+ border: 0;
303
+ height: 0;
304
+ width: 0;
305
+ }
306
+
307
+ &::-moz-range-track {
308
+ background: transparent;
309
+ }
310
+
311
+ &::-moz-range-thumb {
312
+ background: transparent;
313
+ border: 0;
314
+ height: 0;
315
+ width: 0;
316
+ }
317
+ }
318
+
319
+
320
+ /* Menus */
321
+
322
+ .menu {
323
+ animation: 0.35s fadein ease;
324
+ backdrop-filter: blur(10px);
325
+ background: var(--color-menu-background);
326
+ border-radius: 10px;
327
+ bottom: calc(100% + 35px);
328
+ box-shadow: 0 0 32px 0 rgba(0, 0, 0, 100%);
329
+ color: var(--color-menu-text);
330
+ display: grid;
331
+ gap: 5px;
332
+
333
+ /* stylelint-disable-next-line function-name-case */
334
+ max-height: MIN(700px, CALC(var(--portal-height) * 0.7));
335
+ max-width: MIN(450px, CALC(var(--portal-width) * 0.8));
336
+ min-width: 350px;
337
+ overflow-y: auto;
338
+ padding: 12px 8px;
339
+ position: absolute;
340
+ right: 0;
341
+ width: max-content;
342
+
343
+ .menu-option {
344
+ /* Needs more specificity to override reset */
345
+ text-align: left;
346
+ }
347
+ }
348
+
349
+ .menu-option {
350
+ align-items: center;
351
+ border: 1px solid transparent;
352
+ border-radius: 6px;
353
+ display: flex;
354
+ font-size: 16px;
355
+ justify-content: space-between;
356
+ min-height: 45px;
357
+ padding: 8px 15px;
358
+ transition: background-color 0.15s ease, color 0.15s ease;
359
+ width: 100%;
360
+
361
+ &.menu-option-back {
362
+ color: var(--color-menu-text-secondary);
363
+ justify-content: flex-start;
364
+ }
365
+
366
+ .menu-option-back-icon {
367
+ align-items: center;
368
+ display: flex;
369
+ justify-content: center;
370
+ margin-right: 10px;
371
+
372
+ svg {
373
+ height: 10px;
374
+ }
375
+ }
376
+
377
+ &:hover,
378
+ &:focus-visible,
379
+ .focus-visible {
380
+ background: var(--color-menu-button-focused);
381
+ color: var(--color-menu-text);
382
+ outline: 0!important;
383
+ }
384
+
385
+ &.menu-option-active {
386
+ background: var(--color-menu-button-active);
387
+ }
388
+ }
389
+
390
+ .menu-option-icon {
391
+ align-items: center;
392
+ display: flex;
393
+ justify-content: center;
394
+ padding-left: 30px;
395
+
396
+ svg {
397
+ height: 75%;
398
+ }
399
+ }
400
+
401
+ .menu-header {
402
+ color: var(--color-menu-text-header);
403
+ font-weight: 500;
404
+ pointer-events: none;
405
+ user-select: none;
406
+ }
407
+
408
+
409
+ /* Player size/orientation adjustments */
410
+
411
+ :global(.__eluvio-player--size-sm) {
412
+ .volume-slider {
413
+ display: none;
414
+ }
415
+
416
+ .menu {
417
+ bottom: 75px;
418
+ max-width: calc(100% - 30px);
419
+ min-width: calc(100% - 30px);
420
+ right: 15px;
421
+ }
422
+
423
+ .menu-option {
424
+ font-size: 14px;
425
+ min-height: 36px;
426
+ padding: 5px 10px;
427
+ }
428
+
429
+ .seek-container {
430
+ &:hover,
431
+ &:active,
432
+ &:focus,
433
+ &:focus-visible,
434
+ &:has(:focus-visible) {
435
+ .seek-playhead,
436
+ .seek-buffer,
437
+ .seek-input {
438
+ border-radius: 10px;
439
+ height: var(--progress-height-expanded-mobile);
440
+ }
441
+
442
+ ::-webkit-slider-thumb {
443
+ border-radius: 100%;
444
+ height: var(--progress-height-expanded-mobile);
445
+ width: var(--progress-height-expanded-mobile);
446
+ }
447
+
448
+ ::-moz-range-thumb {
449
+ border-radius: 100%;
450
+ height: var(--progress-height-expanded-mobile);
451
+ width: var(--progress-height-expanded-mobile);
452
+ }
453
+ }
454
+ }
455
+ }
456
+
457
+
458
+ /* Animations */
459
+
460
+
461
+ @keyframes spin {
462
+ to { transform: rotate(360deg); }
463
+ }
464
+
465
+ @keyframes fadein {
466
+ from { opacity: 0; }
467
+ to { opacity: 1; }
468
+ }
469
+
470
+ @keyframes fadeout {
471
+ from { opacity: 1; }
472
+ to { opacity: 0; }
473
+ }
474
+
475
+
476
+ @keyframes action-indicator-fade-out {
477
+ 0% { opacity: 0; }
478
+ 5% { opacity: 0.8; }
479
+ 35% { opacity: 0.8; }
480
+ 100% { opacity: 0; }
481
+ }
482
+
483
+ @keyframes action-indicator-icon-scale {
484
+ from { transform: scale(0.5); }
485
+ to { transform: scale(1); }
486
+ }