@cinecrew/cinecrew-player 0.1.1 → 0.1.3

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.
@@ -1,5 +1,6 @@
1
1
  .cinecrew-player {
2
2
  position: relative;
3
+ container-type: size;
3
4
  display: flex;
4
5
  width: 100%;
5
6
  min-width: 0;
@@ -27,6 +28,11 @@
27
28
  background: #000;
28
29
  }
29
30
 
31
+ .cinecrew-player__video,
32
+ .cinecrew-player__youtube {
33
+ transition: width 180ms ease, height 180ms ease, top 180ms ease, left 180ms ease, transform 180ms ease;
34
+ }
35
+
30
36
  .cinecrew-player__shade {
31
37
  position: absolute;
32
38
  inset: 0;
@@ -35,10 +41,10 @@
35
41
 
36
42
  .cinecrew-player__title {
37
43
  position: absolute;
38
- top: 18px;
44
+ top: 62px;
39
45
  left: 20px;
46
+ right: 20px;
40
47
  z-index: 2;
41
- max-width: min(65%, 680px);
42
48
  overflow: hidden;
43
49
  font-weight: 700;
44
50
  text-overflow: ellipsis;
@@ -50,6 +56,7 @@
50
56
  position: absolute;
51
57
  inset: 0;
52
58
  z-index: 3;
59
+ box-sizing: border-box;
53
60
  display: flex;
54
61
  flex-direction: column;
55
62
  justify-content: space-between;
@@ -73,12 +80,48 @@
73
80
  }
74
81
 
75
82
  .cinecrew-player__top-controls,
83
+ .cinecrew-player__bottom-actions,
84
+ .cinecrew-player__top-left-actions,
85
+ .cinecrew-player__top-right-actions,
86
+ .cinecrew-player__bottom-left-actions,
87
+ .cinecrew-player__bottom-right-actions {
88
+ display: flex;
89
+ align-items: center;
90
+ gap: 8px;
91
+ }
92
+
93
+ .cinecrew-player__top-controls {
94
+ width: 100%;
95
+ justify-content: space-between;
96
+ gap: 12px;
97
+ }
98
+
99
+ .cinecrew-player__top-left-actions,
100
+ .cinecrew-player__top-right-actions {
101
+ min-width: 0;
102
+ }
103
+
104
+ .cinecrew-player__top-right-actions {
105
+ justify-content: flex-end;
106
+ }
107
+
76
108
  .cinecrew-player__bottom-controls {
109
+ width: 100%;
110
+ flex-direction: column;
111
+ align-items: stretch;
112
+ gap: 8px;
113
+ }
114
+
115
+ .cinecrew-player__bottom-actions {
116
+ width: 100%;
117
+ justify-content: space-between;
77
118
  flex-wrap: wrap;
78
119
  }
79
120
 
80
- .cinecrew-player__bottom-controls {
81
- justify-content: flex-end;
121
+ .cinecrew-player__bottom-left-actions,
122
+ .cinecrew-player__bottom-right-actions {
123
+ min-width: 0;
124
+ flex-wrap: wrap;
82
125
  }
83
126
 
84
127
  .cinecrew-player__center-controls {
@@ -86,14 +129,25 @@
86
129
  }
87
130
 
88
131
  .cinecrew-player__seek {
89
- flex: 1 1 100%;
132
+ flex: 0 0 auto;
133
+ width: 100%;
134
+ align-items: center;
90
135
  font-variant-numeric: tabular-nums;
91
136
  text-shadow: 0 1px 3px #000;
92
137
  }
93
138
 
139
+ .cinecrew-player__seek > span {
140
+ min-width: 3.4em;
141
+ }
142
+
143
+ .cinecrew-player__seek > span:last-child { text-align: right; }
144
+
94
145
  .cinecrew-player__seek input {
95
146
  flex: 1;
96
147
  min-width: 50px;
148
+ min-height: 24px;
149
+ touch-action: pan-y;
150
+ cursor: ew-resize;
97
151
  }
98
152
 
99
153
  .cinecrew-player__button {
@@ -146,8 +200,9 @@
146
200
 
147
201
  .cinecrew-player__audio-card {
148
202
  position: absolute;
149
- inset: 10%;
203
+ inset: 0;
150
204
  z-index: 5;
205
+ box-sizing: border-box;
151
206
  display: flex;
152
207
  flex-direction: column;
153
208
  align-items: center;
@@ -155,7 +210,7 @@
155
210
  gap: 18px;
156
211
  padding: 24px;
157
212
  border: 1px solid;
158
- border-radius: 20px;
213
+ border-radius: inherit;
159
214
  text-align: center;
160
215
  box-shadow: 0 18px 60px rgba(0, 0, 0, .32);
161
216
  }
@@ -167,6 +222,23 @@
167
222
  border-radius: 50%;
168
223
  }
169
224
 
225
+ .cinecrew-player__audio-placeholder {
226
+ display: grid;
227
+ width: min(30vw, 160px);
228
+ aspect-ratio: 1;
229
+ place-items: center;
230
+ border: 2px solid var(--cinecrew-accent, #00d4ff);
231
+ border-radius: 50%;
232
+ background: radial-gradient(circle at 35% 30%, rgba(0, 212, 255, .28), transparent 58%), linear-gradient(145deg, #142b49, #081321 72%);
233
+ box-shadow: 0 0 28px rgba(0, 212, 255, .2), inset 0 0 22px rgba(0, 212, 255, .12);
234
+ }
235
+
236
+ .cinecrew-player__audio-placeholder .cinecrew-player__icon {
237
+ width: 42px;
238
+ height: 42px;
239
+ font-size: 42px;
240
+ }
241
+
170
242
  .cinecrew-player__audio-wave {
171
243
  letter-spacing: .28em;
172
244
  font-size: 1.25rem;
@@ -225,6 +297,25 @@
225
297
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
226
298
  }
227
299
 
300
+ .cinecrew-player__menu-wrap--aspect .cinecrew-player__menu {
301
+ right: auto;
302
+ left: 0;
303
+ box-sizing: border-box;
304
+ width: min(180px, calc(100vw - 32px));
305
+ min-width: 0;
306
+ max-width: calc(100vw - 32px);
307
+ max-height: min(220px, calc(100vh - 32px));
308
+ overflow-y: auto;
309
+ }
310
+
311
+ @supports (width: 1cqw) and (height: 1cqh) {
312
+ .cinecrew-player__menu-wrap--aspect .cinecrew-player__menu {
313
+ width: min(180px, max(0px, calc(100cqw - 28px)));
314
+ max-width: max(0px, calc(100cqw - 28px));
315
+ max-height: min(220px, max(80px, calc(100cqh - 28px)));
316
+ }
317
+ }
318
+
228
319
  .cinecrew-player__menu button,
229
320
  .cinecrew-player__panel-close {
230
321
  padding: 10px 13px;
@@ -236,9 +327,126 @@
236
327
  font: inherit;
237
328
  }
238
329
 
330
+ .cinecrew-player__menu-empty {
331
+ padding: 10px 13px;
332
+ color: var(--cinecrew-text, #fff);
333
+ white-space: nowrap;
334
+ }
335
+
336
+ .cinecrew-player__menu-wrap--aspect .cinecrew-player__menu button {
337
+ padding-block: 6px;
338
+ }
339
+
340
+ .cinecrew-player__diagnostics {
341
+ display: flex;
342
+ box-sizing: border-box;
343
+ height: 100%;
344
+ flex-direction: column;
345
+ gap: 14px;
346
+ min-width: 0;
347
+ overflow: auto;
348
+ }
349
+
350
+ .cinecrew-player__diagnostics-heading {
351
+ display: flex;
352
+ align-items: flex-start;
353
+ justify-content: space-between;
354
+ gap: 12px;
355
+ padding-bottom: 12px;
356
+ border-bottom: 1px solid rgba(255, 255, 255, .14);
357
+ }
358
+
359
+ .cinecrew-player__diagnostics-heading > div {
360
+ display: flex;
361
+ min-width: 0;
362
+ flex-direction: column;
363
+ gap: 3px;
364
+ }
365
+
366
+ .cinecrew-player__diagnostics-heading strong { font-size: 1.05rem; }
367
+ .cinecrew-player__diagnostics-heading > div > span { opacity: .7; overflow-wrap: anywhere; }
368
+
369
+ .cinecrew-player__diagnostics-close {
370
+ display: grid;
371
+ flex: 0 0 36px;
372
+ width: 36px;
373
+ height: 36px;
374
+ place-items: center;
375
+ border: 1px solid rgba(255,255,255,.2);
376
+ border-radius: 50%;
377
+ color: inherit;
378
+ background: rgba(255,255,255,.1);
379
+ cursor: pointer;
380
+ }
381
+
382
+ .cinecrew-player__diagnostics-status {
383
+ display: flex;
384
+ align-items: center;
385
+ gap: 8px;
386
+ align-self: flex-start;
387
+ padding: 6px 10px;
388
+ border: 1px solid rgba(255,255,255,.15);
389
+ border-radius: 999px;
390
+ background: rgba(255,255,255,.07);
391
+ font-size: .86em;
392
+ }
393
+
394
+ .cinecrew-player__status-dot {
395
+ width: 8px;
396
+ height: 8px;
397
+ border-radius: 50%;
398
+ background: #9ba9bb;
399
+ box-shadow: 0 0 10px currentColor;
400
+ }
401
+
402
+ .cinecrew-player__status-dot.is-playing { color: #42d392; background: currentColor; }
403
+ .cinecrew-player__status-dot.is-buffering { color: #ffca58; background: currentColor; }
404
+ .cinecrew-player__status-dot.is-error { color: #ff647c; background: currentColor; }
405
+
406
+ .cinecrew-player__diagnostic-grid {
407
+ display: grid;
408
+ grid-template-columns: repeat(2, minmax(0, 1fr));
409
+ gap: 9px;
410
+ }
411
+
412
+ .cinecrew-player__diagnostic-card {
413
+ display: grid;
414
+ min-width: 0;
415
+ grid-template-columns: 32px minmax(0, 1fr);
416
+ grid-template-rows: auto auto;
417
+ align-items: center;
418
+ column-gap: 9px;
419
+ row-gap: 3px;
420
+ padding: 10px;
421
+ border: 1px solid rgba(255,255,255,.14);
422
+ border-radius: 12px;
423
+ background: rgba(255,255,255,.08);
424
+ font-variant-numeric: tabular-nums;
425
+ }
426
+
427
+ .cinecrew-player__diagnostic-icon {
428
+ display: grid;
429
+ width: 30px;
430
+ height: 30px;
431
+ grid-row: span 2;
432
+ place-items: center;
433
+ border-radius: 9px;
434
+ background: rgba(255,255,255,.08);
435
+ }
436
+
437
+ .cinecrew-player__diagnostic-icon .cinecrew-player__icon { width: 18px; height: 18px; }
438
+ .cinecrew-player__diagnostic-label { overflow: hidden; opacity: .7; font-size: .76em; text-overflow: ellipsis; white-space: nowrap; }
439
+ .cinecrew-player__diagnostic-card strong { overflow-wrap: anywhere; font-size: .9em; }
440
+ .cinecrew-player__diagnostics-note { opacity: .65; line-height: 1.35; }
441
+
442
+ @media (max-width: 420px) {
443
+ .cinecrew-player__diagnostic-grid { grid-template-columns: minmax(0, 1fr); }
444
+ }
445
+
239
446
  .cinecrew-player__panel-content {
240
447
  display: flex;
241
448
  flex-direction: column;
449
+ height: 100%;
242
450
  gap: 10px;
243
451
  min-height: 0;
244
452
  max-height: 100%;
@@ -283,6 +491,20 @@
283
491
  background: rgba(255, 255, 255, .06);
284
492
  }
285
493
 
494
+ .cinecrew-player__chat-message header {
495
+ display: flex;
496
+ align-items: baseline;
497
+ justify-content: space-between;
498
+ gap: 10px;
499
+ }
500
+
501
+ .cinecrew-player__chat-message time {
502
+ flex: 0 0 auto;
503
+ opacity: .65;
504
+ font-size: .78em;
505
+ font-variant-numeric: tabular-nums;
506
+ }
507
+
286
508
  .cinecrew-player__chat-message strong,
287
509
  .cinecrew-player__epg-item strong {
288
510
  color: var(--cinecrew-accent);
@@ -298,26 +520,206 @@
298
520
  }
299
521
 
300
522
  .cinecrew-player__chat-form {
523
+ position: relative;
524
+ padding-top: 10px;
525
+ border-top: 1px solid rgba(255,255,255,.12);
526
+ }
527
+
528
+ .cinecrew-player__chat-composer {
529
+ position: relative;
301
530
  display: flex;
302
- gap: 8px;
531
+ align-items: center;
532
+ gap: 7px;
533
+ padding: 5px 6px 5px 10px;
534
+ border: 1px solid rgba(255, 255, 255, .22);
535
+ border-radius: 14px;
536
+ background: rgba(12, 20, 32, .72);
537
+ box-shadow: 0 3px 12px rgba(0,0,0,.12);
538
+ transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
303
539
  }
304
540
 
305
- .cinecrew-player__chat-form input {
541
+ .cinecrew-player__chat-composer:focus-within {
542
+ border-color: var(--cinecrew-accent);
543
+ background: rgba(12, 20, 32, .88);
544
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--cinecrew-accent) 18%, transparent);
545
+ }
546
+
547
+ .cinecrew-player__chat-composer input {
306
548
  flex: 1;
307
549
  min-width: 0;
308
- border: 1px solid rgba(255, 255, 255, .16);
309
- border-radius: 20px;
310
- padding: 10px 13px;
550
+ border: 0;
551
+ outline: 0;
552
+ padding: 10px 4px;
311
553
  color: inherit;
312
- background: rgba(0, 0, 0, .2);
554
+ background: transparent;
555
+ font: inherit;
556
+ }
557
+
558
+ .cinecrew-player__chat-composer button {
559
+ display: inline-grid;
560
+ min-width: 34px;
561
+ min-height: 34px;
562
+ place-items: center;
563
+ border: 0;
564
+ border-radius: 50%;
565
+ color: var(--cinecrew-accent);
566
+ background: rgba(255, 255, 255, .08);
567
+ cursor: pointer;
313
568
  font: inherit;
569
+ transition: background-color .16s ease, transform .16s ease;
314
570
  }
315
571
 
316
- .cinecrew-player__chat-form button:disabled {
572
+ .cinecrew-player__chat-composer button:hover:not(:disabled) {
573
+ background: rgba(255, 255, 255, .15);
574
+ }
575
+
576
+ .cinecrew-player__chat-composer button:active:not(:disabled) {
577
+ transform: scale(.96);
578
+ }
579
+
580
+ .cinecrew-player__chat-composer button[type="submit"] {
581
+ width: 40px;
582
+ min-width: 40px;
583
+ height: 40px;
584
+ min-height: 40px;
585
+ padding: 0;
586
+ border-radius: 12px;
587
+ color: #07111e;
588
+ background: var(--cinecrew-accent);
589
+ box-shadow: 0 2px 8px color-mix(in srgb, var(--cinecrew-accent) 24%, transparent);
590
+ }
591
+
592
+ .cinecrew-player__chat-composer button[type="submit"] .cinecrew-player__icon { width: 19px; height: 19px; }
593
+
594
+ .cinecrew-player__chat-composer button[type="submit"]:hover:not(:disabled) {
595
+ filter: brightness(1.08);
596
+ }
597
+
598
+ .cinecrew-player__chat-composer button:disabled {
317
599
  opacity: .5;
318
600
  cursor: not-allowed;
319
601
  }
320
602
 
603
+ .cinecrew-player__emoji-picker {
604
+ position: absolute;
605
+ right: 0;
606
+ bottom: calc(100% + 12px);
607
+ z-index: 2;
608
+ display: flex;
609
+ flex-direction: column;
610
+ gap: 8px;
611
+ width: min(340px, calc(100vw - 32px));
612
+ max-height: min(390px, 65vh);
613
+ padding: 10px;
614
+ border: 1px solid rgba(255, 255, 255, .18);
615
+ border-radius: 14px;
616
+ background: var(--cinecrew-surface);
617
+ box-shadow: 0 10px 30px rgba(0, 0, 0, .42);
618
+ }
619
+
620
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-search {
621
+ flex: 0 0 auto;
622
+ width: 100%;
623
+ box-sizing: border-box;
624
+ border: 1px solid rgba(255, 255, 255, .16);
625
+ border-radius: 10px;
626
+ outline: 0;
627
+ padding: 9px 11px;
628
+ color: inherit;
629
+ background: rgba(0, 0, 0, .2);
630
+ font: inherit;
631
+ font-size: 13px;
632
+ }
633
+
634
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-search:focus {
635
+ border-color: var(--cinecrew-accent);
636
+ }
637
+
638
+ .cinecrew-player__emoji-categories {
639
+ display: grid;
640
+ flex: 0 0 auto;
641
+ grid-template-columns: repeat(9, minmax(0, 1fr));
642
+ gap: 2px;
643
+ }
644
+
645
+ .cinecrew-player__emoji-picker button,
646
+ .cinecrew-player__load-more {
647
+ border: 1px solid rgba(255, 255, 255, .14);
648
+ border-radius: 9px;
649
+ color: inherit;
650
+ background: rgba(255, 255, 255, .07);
651
+ cursor: pointer;
652
+ font: inherit;
653
+ }
654
+
655
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-categories button {
656
+ display: grid;
657
+ min-width: 0;
658
+ min-height: 34px;
659
+ place-items: center;
660
+ border: 1px solid transparent;
661
+ border-radius: 8px;
662
+ padding: 0;
663
+ background: transparent;
664
+ font-size: 19px;
665
+ }
666
+
667
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-categories button:hover,
668
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-categories button.is-active {
669
+ border-color: var(--cinecrew-accent);
670
+ background: color-mix(in srgb, var(--cinecrew-accent) 14%, transparent);
671
+ }
672
+
673
+ .cinecrew-player__emoji-grid {
674
+ display: grid;
675
+ flex: 1 1 auto;
676
+ grid-template-columns: repeat(8, minmax(0, 1fr));
677
+ align-content: start;
678
+ gap: 3px;
679
+ min-height: 0;
680
+ overflow: auto;
681
+ overscroll-behavior: contain;
682
+ scrollbar-width: thin;
683
+ }
684
+
685
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-grid button {
686
+ display: grid;
687
+ width: 100%;
688
+ min-width: 0;
689
+ min-height: 34px;
690
+ place-items: center;
691
+ border: 0;
692
+ border-radius: 8px;
693
+ padding: 0;
694
+ background: transparent;
695
+ font-size: 19px;
696
+ }
697
+
698
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-grid button:hover {
699
+ background: rgba(255, 255, 255, .12);
700
+ }
701
+
702
+ .cinecrew-player__chat-composer .cinecrew-player__emoji-grid .cinecrew-player__emoji-load-more {
703
+ grid-column: 1 / -1;
704
+ min-height: 34px;
705
+ border: 1px solid rgba(255, 255, 255, .14);
706
+ color: var(--cinecrew-accent);
707
+ background: rgba(255, 255, 255, .06);
708
+ font-size: 12px;
709
+ }
710
+
711
+ .cinecrew-player__load-more {
712
+ flex: 0 0 auto;
713
+ align-self: center;
714
+ padding: 8px 14px;
715
+ color: var(--cinecrew-accent);
716
+ }
717
+
718
+ .cinecrew-player__load-more:disabled {
719
+ opacity: .6;
720
+ cursor: progress;
721
+ }
722
+
321
723
  .cinecrew-player__rate {
322
724
  max-width: 88px;
323
725
  border: 1px solid rgba(255, 255, 255, .18);
@@ -352,14 +754,39 @@
352
754
 
353
755
  .cinecrew-player__panel {
354
756
  position: absolute;
355
- inset: 8% 4% 8% auto;
757
+ inset: 0 0 0 auto;
356
758
  z-index: 6;
357
- width: min(380px, 92%);
759
+ box-sizing: border-box;
760
+ width: min(420px, 92%);
761
+ max-width: 92%;
358
762
  overflow: auto;
359
- padding: 18px;
360
- border: 1px solid rgba(255,255,255,.14);
361
- border-radius: 16px;
362
- box-shadow: 0 16px 48px rgba(0,0,0,.45);
763
+ padding: 16px;
764
+ border-left: 1px solid rgba(255,255,255,.2);
765
+ border-radius: 0;
766
+ background: rgba(13, 26, 44, .58);
767
+ backdrop-filter: blur(10px);
768
+ box-shadow: -12px 0 34px rgba(0,0,0,.34);
769
+ animation: cinecrew-drawer-in 180ms ease-out both;
770
+ }
771
+
772
+ .cinecrew-player--drawer-resize .cinecrew-player__panel {
773
+ width: calc(100% - var(--cinecrew-media-width, 64%));
774
+ max-width: none;
775
+ padding: 14px;
776
+ }
777
+
778
+ .cinecrew-player__panel.is-resizing { background: rgba(13, 26, 44, .82); }
779
+
780
+ .cinecrew-player--drawer-resize .cinecrew-player__shade,
781
+ .cinecrew-player--drawer-resize .cinecrew-player__controls,
782
+ .cinecrew-player--drawer-resize .cinecrew-player__status,
783
+ .cinecrew-player--drawer-resize .cinecrew-player__error {
784
+ right: auto;
785
+ width: var(--cinecrew-media-width, 64%);
786
+ }
787
+
788
+ .cinecrew-player--drawer-resize .cinecrew-player__title {
789
+ right: calc(100% - var(--cinecrew-media-width, 64%));
363
790
  }
364
791
 
365
792
  .cinecrew-player__panel-close {
@@ -373,6 +800,35 @@
373
800
  to { transform: rotate(360deg); }
374
801
  }
375
802
 
803
+ @keyframes cinecrew-drawer-in {
804
+ from { opacity: 0; transform: translateX(18px); }
805
+ to { opacity: 1; transform: translateX(0); }
806
+ }
807
+
376
808
  @media (hover: none) {
377
809
  .cinecrew-player__controls { opacity: 1; }
378
810
  }
811
+
812
+ @media (max-width: 640px) {
813
+ .cinecrew-player__controls { padding: 10px; }
814
+ .cinecrew-player__top-controls { align-items: flex-start; gap: 6px; }
815
+ .cinecrew-player__top-left-actions { gap: 4px; }
816
+ .cinecrew-player__top-right-actions {
817
+ max-width: calc(100% - 128px);
818
+ flex-wrap: wrap;
819
+ gap: 4px;
820
+ }
821
+ .cinecrew-player__top-left-actions .cinecrew-player__button,
822
+ .cinecrew-player__top-right-actions .cinecrew-player__button,
823
+ .cinecrew-player__bottom-actions .cinecrew-player__button {
824
+ min-width: 34px;
825
+ min-height: 34px;
826
+ padding: 6px 8px;
827
+ }
828
+ .cinecrew-player__title { top: 96px; left: 12px; right: 12px; }
829
+ .cinecrew-player__bottom-actions { align-items: flex-end; gap: 6px; }
830
+ .cinecrew-player__bottom-right-actions { max-width: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
831
+ .cinecrew-player__panel { width: min(380px, 92%); }
832
+ .cinecrew-player--drawer-resize { --cinecrew-media-width: 52% !important; }
833
+ .cinecrew-player--drawer-resize .cinecrew-player__panel { width: calc(100% - var(--cinecrew-media-width)); padding: 10px; }
834
+ }
package/types/index.d.ts CHANGED
@@ -32,14 +32,16 @@ export interface PlayerControls {
32
32
  audioOnly?: boolean;
33
33
  audioTracks?: boolean;
34
34
  playbackRate?: boolean;
35
- minimize?: boolean;
36
35
  fullscreen?: boolean;
37
36
  recording?: boolean;
38
37
  liveChat?: boolean;
39
38
  epg?: boolean;
39
+ diagnostics?: boolean;
40
40
  seek?: boolean;
41
41
  }
42
42
 
43
+ export type PlayerDrawerMode = 'overlay' | 'resize';
44
+
43
45
  export interface PlayerApi {
44
46
  play(): void;
45
47
  pause(): void;
@@ -54,7 +56,6 @@ export interface PlayerApi {
54
56
  seekTo(seconds: number): void;
55
57
  seekBy(seconds: number): void;
56
58
  back(): void;
57
- minimize(): void;
58
59
  setPlaybackRate(rate: number): void;
59
60
  getVideoElement(): unknown | null;
60
61
  getAudioTracks(): AudioTrack[];
@@ -89,7 +90,6 @@ export interface PlayerActions {
89
90
  onVideoOnlyChange?: PlayerAction;
90
91
  onAudioOnlyChange?: PlayerAction;
91
92
  onAudioTrackChange?: PlayerAction;
92
- onMinimize?: PlayerAction;
93
93
  onPlaybackRateChange?: PlayerAction;
94
94
  onFullscreen?: PlayerAction;
95
95
  onRecordingStart?: PlayerAction;
@@ -125,8 +125,8 @@ export interface PlayerIconProps {
125
125
  export type PlayerIcon = string | React.ReactNode | React.ComponentType<PlayerIconProps>;
126
126
  export type PlayerIcons = Partial<Record<
127
127
  | 'play' | 'pause' | 'restart' | 'lock' | 'unlock' | 'mute' | 'unmute'
128
- | 'aspectRatio' | 'videoOnly' | 'audio' | 'minimize' | 'back'
129
- | 'recording' | 'stop' | 'liveChat' | 'epg' | 'fullscreen' | 'close'
128
+ | 'aspectRatio' | 'videoOnly' | 'audio' | 'back'
129
+ | 'recording' | 'stop' | 'liveChat' | 'epg' | 'diagnostics' | 'fullscreen' | 'close'
130
130
  | string,
131
131
  PlayerIcon
132
132
  >>;
@@ -137,9 +137,19 @@ export interface ChatMessage {
137
137
  comment?: string;
138
138
  message?: string;
139
139
  createdAt?: string | number;
140
+ timestamp?: string | number;
140
141
  [key: string]: unknown;
141
142
  }
142
143
 
144
+ export interface ChatMessagePage {
145
+ messages?: ChatMessage[];
146
+ items?: ChatMessage[];
147
+ comments?: ChatMessage[];
148
+ data?: ChatMessage[];
149
+ hasMore?: boolean;
150
+ pagination?: { hasMore?: boolean };
151
+ }
152
+
143
153
  export interface EpgListing {
144
154
  title?: string;
145
155
  description?: string;
@@ -152,7 +162,7 @@ export interface PlayerIntegrations {
152
162
  user?: { id?: string | number; username?: string };
153
163
  getUser?: () => Promise<{ id?: string | number; username?: string } | null>;
154
164
  liveChat?: {
155
- loadMessages?: (args: { channelId: string; limit: number }) => Promise<ChatMessage[]>;
165
+ loadMessages?: (args: { channelId: string; limit: number; offset?: number }) => Promise<ChatMessage[] | ChatMessagePage>;
156
166
  sendMessage?: (args: { channelId: string; userId?: string | number; username?: string; comment: string }) => Promise<unknown>;
157
167
  pollIntervalMs?: number;
158
168
  render?: (context: { title: string; source: PlayerSource; onClose: () => void }) => React.ReactNode;
@@ -195,6 +205,12 @@ export interface CineCrewPlayerProps {
195
205
  volume?: number;
196
206
  playbackRate?: number;
197
207
  controls?: PlayerControls;
208
+ /** Web/Electron chat and EPG drawer behavior. Overlay keeps the video full-size; resize shrinks it to make room. */
209
+ drawerMode?: PlayerDrawerMode;
210
+ /** Web CSS or React Native view-style overrides for the chat, EPG, and diagnostics drawer. */
211
+ drawerStyle?: React.CSSProperties | import('react-native').ViewStyle;
212
+ /** Number of chat messages fetched per page; older pages load from the drawer's See more button. Defaults to 50. */
213
+ messagePageSize?: number;
198
214
  features?: { diagnostics?: boolean; [key: string]: boolean | undefined };
199
215
  actions?: PlayerActions;
200
216
  integrations?: PlayerIntegrations;
@@ -219,7 +235,6 @@ export interface CineCrewPlayerProps {
219
235
  shuffle?: boolean;
220
236
  onClose?: () => void;
221
237
  onBack?: () => void;
222
- onMinimize?: () => void;
223
238
  onFullscreen?: (state: { isFullscreen: boolean }) => void;
224
239
  onPlayerHostRef?: (node: unknown | null) => void;
225
240
  onInlinePreviewWheel?: (deltaY: number) => void;