@supr-design/flux-player 0.0.0-stage → 1.1.0

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/styles.css ADDED
@@ -0,0 +1,501 @@
1
+ .flux-player-wrapper {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ background-color: var(--flux-player-colors-background, #000);
6
+ font-family: var(--flux-player-typography-fontFamily, sans-serif);
7
+ color: var(--flux-player-colors-textPrimary, #fff);
8
+ overflow: hidden;
9
+ display: flex;
10
+ flex-direction: column;
11
+ }
12
+
13
+ .flux-player-video {
14
+ width: 100%;
15
+ height: 100%;
16
+ object-fit: contain;
17
+ }
18
+
19
+ .flux-player-overlay {
20
+ position: absolute;
21
+ inset: 0;
22
+ display: flex;
23
+ flex-direction: column;
24
+ justify-content: flex-end;
25
+ pointer-events: none;
26
+ transition: opacity 0.3s ease;
27
+ z-index: 10;
28
+ }
29
+
30
+ .flux-player-overlay.flux-idle {
31
+ opacity: 0;
32
+ }
33
+
34
+ /* Subtitle rendering layer — sits below overlay z-index but above video;
35
+ always at full opacity regardless of control visibility. */
36
+ .flux-player-subtitles {
37
+ position: absolute;
38
+ left: 0;
39
+ right: 0;
40
+ bottom: 16px;
41
+ text-align: center;
42
+ pointer-events: none;
43
+ z-index: 8;
44
+ padding: 0 8%;
45
+ transition: bottom 0.3s ease;
46
+ line-height: 1.5;
47
+ }
48
+
49
+ /* Raised above the control bar when controls are visible */
50
+ .flux-player-subtitles.flux-subs-raised {
51
+ bottom: 88px;
52
+ }
53
+
54
+ .flux-player-subtitle-text {
55
+ display: inline;
56
+ background: rgba(0, 0, 0, 0.75);
57
+ color: #fff;
58
+ font-size: 1rem;
59
+ padding: 2px 6px;
60
+ border-radius: 2px;
61
+ white-space: pre-wrap;
62
+ -webkit-box-decoration-break: clone;
63
+ box-decoration-break: clone;
64
+ }
65
+
66
+ .flux-player-controls {
67
+ pointer-events: auto;
68
+ background: linear-gradient(transparent, var(--flux-player-colors-overlayGradientEnd, rgba(0,0,0,0.7)));
69
+ padding: var(--flux-player-spacing-md, 16px);
70
+ display: flex;
71
+ flex-direction: column;
72
+ gap: var(--flux-player-spacing-sm, 8px);
73
+ position: relative;
74
+ }
75
+
76
+ .flux-player-timeline {
77
+ width: 100%;
78
+ height: 4px;
79
+ background: var(--flux-player-colors-surfaceElevated, rgba(255,255,255,0.2));
80
+ border-radius: var(--flux-player-radius-sm, 4px);
81
+ position: relative;
82
+ cursor: pointer;
83
+ transition: height 0.1s ease;
84
+ }
85
+
86
+ .flux-player-timeline:hover {
87
+ height: 6px;
88
+ }
89
+
90
+ .flux-player-timeline-progress {
91
+ position: absolute;
92
+ top: 0;
93
+ left: 0;
94
+ bottom: 0;
95
+ background: var(--flux-player-colors-brandPrimary, #3b82f6);
96
+ border-radius: var(--flux-player-radius-sm, 4px);
97
+ width: 0%;
98
+ pointer-events: none;
99
+ }
100
+
101
+ .flux-player-timeline-progress::after {
102
+ content: '';
103
+ position: absolute;
104
+ right: -6px;
105
+ top: 50%;
106
+ transform: translateY(-50%);
107
+ width: 12px;
108
+ height: 12px;
109
+ background: var(--flux-player-colors-brandPrimary, #3b82f6);
110
+ border-radius: 50%;
111
+ box-shadow: 0 0 4px rgba(0,0,0,0.5);
112
+ opacity: 0;
113
+ transition: opacity 0.15s ease, transform 0.15s ease;
114
+ pointer-events: none;
115
+ }
116
+
117
+ .flux-player-timeline:hover .flux-player-timeline-progress::after,
118
+ .flux-player-wrapper.flux-dragging .flux-player-timeline-progress::after {
119
+ opacity: 1;
120
+ transform: translateY(-50%) scale(1.2);
121
+ }
122
+
123
+ .flux-player-timeline-buffered {
124
+ position: absolute;
125
+ top: 0;
126
+ left: 0;
127
+ bottom: 0;
128
+ background: var(--flux-player-colors-buffered, rgba(255,255,255,0.4));
129
+ border-radius: var(--flux-player-radius-sm, 4px);
130
+ width: 0%;
131
+ pointer-events: none;
132
+ }
133
+
134
+ .flux-player-thumbnail-preview {
135
+ position: absolute;
136
+ bottom: 14px;
137
+ transform: translateX(-50%);
138
+ display: flex;
139
+ flex-direction: column;
140
+ align-items: center;
141
+ gap: 4px;
142
+ padding: 6px;
143
+ border-radius: 8px;
144
+ background: rgba(0, 0, 0, 0.85);
145
+ border: 1px solid rgba(255, 255, 255, 0.15);
146
+ pointer-events: none;
147
+ z-index: 25;
148
+ }
149
+
150
+ .flux-player-thumbnail-preview.flux-hidden {
151
+ display: none;
152
+ }
153
+
154
+ .flux-player-thumbnail-image {
155
+ width: 160px;
156
+ height: 90px;
157
+ display: block;
158
+ border-radius: 4px;
159
+ background: #111;
160
+ }
161
+
162
+ .flux-player-toolbar {
163
+ display: flex;
164
+ align-items: center;
165
+ justify-content: space-between;
166
+ }
167
+
168
+ .flux-player-toolbar-group {
169
+ display: flex;
170
+ align-items: center;
171
+ gap: var(--flux-player-spacing-sm, 8px);
172
+ }
173
+
174
+ .flux-player-icon-btn {
175
+ background: transparent;
176
+ border: none;
177
+ color: inherit;
178
+ cursor: pointer;
179
+ padding: 4px;
180
+ border-radius: var(--flux-player-radius-sm, 4px);
181
+ display: flex;
182
+ align-items: center;
183
+ justify-content: center;
184
+ transition: background 0.2s ease;
185
+ }
186
+
187
+ .flux-player-icon-btn:hover {
188
+ background: var(--flux-player-colors-surface, rgba(255,255,255,0.1));
189
+ }
190
+
191
+ .flux-player-icon-btn.flux-disabled,
192
+ .flux-player-icon-btn[disabled] {
193
+ opacity: 0.45;
194
+ cursor: not-allowed;
195
+ }
196
+
197
+ .flux-player-icon-btn.flux-active {
198
+ color: var(--flux-player-colors-brandPrimary, #3b82f6);
199
+ }
200
+
201
+ .flux-player-icon-btn svg {
202
+ width: var(--flux-player-control-iconSize, 24px);
203
+ height: var(--flux-player-control-iconSize, 24px);
204
+ fill: currentColor;
205
+ }
206
+
207
+ .flux-player-icon-btn:focus-visible,
208
+ .flux-player-volume-slider:focus-visible,
209
+ .flux-player-timeline:focus-visible,
210
+ .flux-player-menu-item:focus-visible,
211
+ .flux-player-big-play:focus-visible,
212
+ .flux-player-replay:focus-visible {
213
+ outline: 2px solid var(--flux-player-colors-focus, rgba(59, 130, 246, 0.6));
214
+ outline-offset: 2px;
215
+ }
216
+
217
+ .flux-player-time {
218
+ font-size: var(--flux-player-typography-fontSizeSm, 12px);
219
+ font-weight: var(--flux-player-typography-fontWeightMedium, 500);
220
+ user-select: none;
221
+ }
222
+
223
+ .flux-player-time.flux-hidden {
224
+ display: none;
225
+ }
226
+
227
+ .flux-player-big-play {
228
+ position: absolute;
229
+ top: 50%;
230
+ left: 50%;
231
+ transform: translate(-50%, -50%);
232
+ width: 64px;
233
+ height: 64px;
234
+ background: var(--flux-player-colors-brandPrimary, #3b82f6);
235
+ border-radius: 50%;
236
+ display: flex;
237
+ align-items: center;
238
+ justify-content: center;
239
+ cursor: pointer;
240
+ pointer-events: auto;
241
+ transition: transform 0.2s ease, opacity 0.2s ease;
242
+ z-index: 10;
243
+ }
244
+
245
+ .flux-player-replay {
246
+ position: absolute;
247
+ top: 50%;
248
+ left: 50%;
249
+ transform: translate(-50%, -50%);
250
+ width: 64px;
251
+ height: 64px;
252
+ background: var(--flux-player-colors-brandPrimary, #3b82f6);
253
+ border-radius: 50%;
254
+ display: flex;
255
+ align-items: center;
256
+ justify-content: center;
257
+ cursor: pointer;
258
+ pointer-events: auto;
259
+ transition: transform 0.2s ease, opacity 0.2s ease;
260
+ z-index: 10;
261
+ }
262
+
263
+ .flux-player-replay:hover {
264
+ transform: translate(-50%, -50%) scale(1.1);
265
+ }
266
+
267
+ .flux-player-replay svg {
268
+ width: 30px;
269
+ height: 30px;
270
+ fill: #fff;
271
+ }
272
+
273
+ .flux-player-replay.flux-hidden {
274
+ opacity: 0;
275
+ pointer-events: none;
276
+ }
277
+
278
+ .flux-player-big-play:hover {
279
+ transform: translate(-50%, -50%) scale(1.1);
280
+ }
281
+
282
+ .flux-player-big-play.flux-hidden {
283
+ opacity: 0;
284
+ pointer-events: none;
285
+ }
286
+
287
+ .flux-player-spinner {
288
+ position: absolute;
289
+ top: 50%;
290
+ left: 50%;
291
+ transform: translate(-50%, -50%);
292
+ width: 48px;
293
+ height: 48px;
294
+ border: 4px solid var(--flux-player-colors-surfaceElevated, rgba(255,255,255,0.2));
295
+ border-top-color: var(--flux-player-colors-brandPrimary, #3b82f6);
296
+ border-radius: 50%;
297
+ animation: flux-spin 1s linear infinite;
298
+ pointer-events: none;
299
+ z-index: 9;
300
+ }
301
+
302
+ .flux-player-spinner.flux-hidden {
303
+ display: none;
304
+ }
305
+
306
+ .flux-player-error {
307
+ position: absolute;
308
+ inset: 0;
309
+ background: var(--flux-player-colors-overlayError, rgba(0,0,0,0.8));
310
+ display: flex;
311
+ flex-direction: column;
312
+ align-items: center;
313
+ justify-content: center;
314
+ text-align: center;
315
+ padding: 24px;
316
+ z-index: 20;
317
+ pointer-events: auto;
318
+ }
319
+
320
+ .flux-player-error.flux-hidden {
321
+ display: none;
322
+ }
323
+
324
+ .flux-player-error-title {
325
+ color: var(--flux-player-colors-danger, #ef4444);
326
+ font-size: var(--flux-player-typography-fontSizeLg, 18px);
327
+ margin-bottom: 8px;
328
+ }
329
+
330
+ .flux-player-error-text {
331
+ color: var(--flux-player-colors-textSecondary, #a1a1aa);
332
+ font-size: var(--flux-player-typography-fontSizeMd, 14px);
333
+ }
334
+
335
+ @keyframes flux-spin {
336
+ to { transform: translate(-50%, -50%) rotate(360deg); }
337
+ }
338
+
339
+ /* Volume Slider */
340
+ .flux-player-volume-container {
341
+ display: flex;
342
+ align-items: center;
343
+ gap: 8px;
344
+ }
345
+ .flux-player-volume-slider {
346
+ width: 60px;
347
+ appearance: none;
348
+ background: var(--flux-player-colors-surfaceElevated, rgba(255,255,255,0.2));
349
+ height: 4px;
350
+ border-radius: 2px;
351
+ outline: none;
352
+ }
353
+ .flux-player-volume-slider::-webkit-slider-thumb {
354
+ appearance: none;
355
+ width: 12px;
356
+ height: 12px;
357
+ border-radius: 50%;
358
+ background: var(--flux-player-colors-brandPrimary, #3b82f6);
359
+ cursor: pointer;
360
+ }
361
+ /* Settings Menu */
362
+ .flux-player-settings-menu {
363
+ position: absolute;
364
+ bottom: calc(100% + 10px);
365
+ right: var(--flux-player-spacing-md, 16px);
366
+ background: var(--flux-player-colors-menuBackground, rgba(15, 15, 15, 0.9));
367
+ backdrop-filter: blur(8px);
368
+ border: 1px solid var(--flux-player-colors-menuBorder, rgba(255, 255, 255, 0.1));
369
+ border-radius: var(--flux-player-radius-md, 8px);
370
+ padding: 8px 0;
371
+ width: 220px;
372
+ max-height: min(320px, 60vh);
373
+ box-shadow: 0 10px 30px rgba(0,0,0,0.5);
374
+ z-index: 30;
375
+ overflow-y: auto;
376
+ overflow-x: hidden;
377
+ display: flex;
378
+ flex-direction: column;
379
+ transition: opacity 0.2s ease, transform 0.2s ease;
380
+ pointer-events: auto;
381
+ }
382
+
383
+ .flux-player-settings-menu::-webkit-scrollbar {
384
+ width: 8px;
385
+ }
386
+
387
+ .flux-player-settings-menu::-webkit-scrollbar-track {
388
+ background: transparent;
389
+ }
390
+
391
+ .flux-player-settings-menu::-webkit-scrollbar-thumb {
392
+ background: var(--flux-player-colors-menuBorder, rgba(255, 255, 255, 0.2));
393
+ border-radius: 8px;
394
+ }
395
+
396
+ .flux-player-settings-menu::-webkit-scrollbar-thumb:hover {
397
+ background: var(--flux-player-colors-menuHover, rgba(255, 255, 255, 0.35));
398
+ }
399
+
400
+ .flux-player-settings-menu.flux-hidden {
401
+ opacity: 0;
402
+ transform: translateY(10px);
403
+ pointer-events: none;
404
+ }
405
+
406
+ .flux-player-menu-section {
407
+ padding: 8px 0;
408
+ }
409
+
410
+ .flux-player-menu-section + .flux-player-menu-section {
411
+ border-top: 1px solid var(--flux-player-colors-menuBorder, rgba(255, 255, 255, 0.1));
412
+ }
413
+
414
+ .flux-player-menu-header {
415
+ padding: 4px 16px;
416
+ font-size: 11px;
417
+ font-weight: 700;
418
+ text-transform: uppercase;
419
+ color: var(--flux-player-colors-textSecondary, #a1a1aa);
420
+ letter-spacing: 0.05em;
421
+ }
422
+
423
+ .flux-player-menu-item {
424
+ padding: 8px 16px;
425
+ font-size: 13px;
426
+ cursor: pointer;
427
+ display: flex;
428
+ align-items: center;
429
+ justify-content: space-between;
430
+ transition: background 0.15s ease;
431
+ user-select: none;
432
+ }
433
+
434
+ .flux-player-menu-item:hover {
435
+ background: var(--flux-player-colors-menuHover, rgba(255, 255, 255, 0.1));
436
+ }
437
+
438
+ .flux-player-menu-item.flux-active {
439
+ color: var(--flux-player-colors-brandPrimary, #3b82f6);
440
+ background: var(--flux-player-colors-menuActive, rgba(59, 130, 246, 0.1));
441
+ }
442
+
443
+ .flux-player-menu-item.flux-active::after {
444
+ content: '✓';
445
+ font-weight: bold;
446
+ }
447
+
448
+ .flux-player-menu-placeholder {
449
+ padding: 12px 16px;
450
+ font-size: 13px;
451
+ color: var(--flux-player-colors-textSecondary, #a1a1aa);
452
+ font-style: italic;
453
+ }
454
+
455
+ .flux-player-live-badge {
456
+ display: flex;
457
+ align-items: center;
458
+ gap: 6px;
459
+ font-family: inherit;
460
+ font-size: 0.8rem;
461
+ font-weight: 700;
462
+ text-transform: uppercase;
463
+ color: var(--flux-player-colors-textPrimary, #ffffff);
464
+ background: var(--flux-player-colors-surface, rgba(255, 255, 255, 0.1));
465
+ padding: 4px 8px;
466
+ border-radius: 4px;
467
+ margin-right: 8px;
468
+ user-select: none;
469
+ }
470
+
471
+ .flux-player-live-badge.flux-hidden {
472
+ display: none;
473
+ }
474
+
475
+ .flux-player-live-badge span {
476
+ width: 6px;
477
+ height: 6px;
478
+ border-radius: 50%;
479
+ background-color: #ff3b3b;
480
+ box-shadow: 0 0 6px #ff3b3b;
481
+ animation: flux-live-pulse 2s infinite ease-in-out;
482
+ }
483
+
484
+ @keyframes flux-live-pulse {
485
+ 0% { opacity: 1; }
486
+ 50% { opacity: 0.3; }
487
+ 100% { opacity: 1; }
488
+ }
489
+
490
+ .flux-player-timeline.flux-disabled {
491
+ pointer-events: none;
492
+ opacity: 0.5;
493
+ }
494
+
495
+ .flux-player-timeline.flux-disabled .flux-player-timeline-progress::after {
496
+ display: none;
497
+ }
498
+
499
+ .flux-player-toolbar-group .flux-hidden {
500
+ display: none;
501
+ }
@@ -0,0 +1,50 @@
1
+ # Licenses
2
+
3
+ The app bundles dependencies which contain the following licenses:
4
+
5
+ ## dashjs - 5.1.1 (BSD-3-Clause)
6
+
7
+ # dash.js BSD License Agreement
8
+
9
+ The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license.
10
+
11
+ **Copyright (c) 2015, Dash Industry Forum.
12
+ **All rights reserved.**
13
+
14
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
15
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
16
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
17
+ * Neither the name of the Dash Industry Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
18
+
19
+ **THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.**
20
+
21
+ ## hls.js - 1.6.15 (Apache-2.0)
22
+
23
+ Copyright (c) 2017 Dailymotion (http://www.dailymotion.com)
24
+
25
+ Licensed under the Apache License, Version 2.0 (the "License");
26
+ you may not use this file except in compliance with the License.
27
+ You may obtain a copy of the License at
28
+
29
+ http://www.apache.org/licenses/LICENSE-2.0
30
+
31
+ Unless required by applicable law or agreed to in writing, software
32
+ distributed under the License is distributed on an "AS IS" BASIS,
33
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34
+ See the License for the specific language governing permissions and
35
+ limitations under the License.
36
+
37
+ src/remux/mp4-generator.js and src/demux/exp-golomb.ts implementation in this project
38
+ are derived from the HLS library for video.js (https://github.com/videojs/videojs-contrib-hls)
39
+
40
+ That work is also covered by the Apache 2 License, following copyright:
41
+ Copyright (c) 2013-2015 Brightcove
42
+
43
+
44
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
46
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
47
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
48
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
49
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
50
+ THE SOFTWARE.