react-helios 2.4.0 → 2.5.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/README.md +177 -71
- package/dist/index.d.mts +34 -52
- package/dist/index.d.ts +34 -52
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +135 -0
- package/package.json +5 -3
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -48,6 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
@keyframes rvp-spin {
|
|
52
|
+
to {
|
|
53
|
+
transform: rotate(360deg);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
51
57
|
.bufferingText {
|
|
52
58
|
font-size: 14px;
|
|
53
59
|
font-weight: 500;
|
|
@@ -555,3 +561,132 @@
|
|
|
555
561
|
transform: translate(-50%, -50%) scale(1.25);
|
|
556
562
|
transition: none;
|
|
557
563
|
}
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
/* ─── Audio Mode Overlay ───────────────────────────────────────────────────── */
|
|
567
|
+
|
|
568
|
+
.rvp-audio-overlay {
|
|
569
|
+
position: absolute;
|
|
570
|
+
inset: 0;
|
|
571
|
+
background: #121212;
|
|
572
|
+
z-index: 1;
|
|
573
|
+
cursor: pointer;
|
|
574
|
+
overflow: hidden;
|
|
575
|
+
display: flex;
|
|
576
|
+
flex-direction: column;
|
|
577
|
+
align-items: center;
|
|
578
|
+
justify-content: center;
|
|
579
|
+
gap: 14px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/* ─── Artwork (smaller, centred) ─────────────────────────────────────────── */
|
|
583
|
+
|
|
584
|
+
.rvp-audio-artwork-container {
|
|
585
|
+
display: flex;
|
|
586
|
+
align-items: center;
|
|
587
|
+
justify-content: center;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.rvp-audio-artwork {
|
|
591
|
+
width: min(480px, 80%);
|
|
592
|
+
aspect-ratio: 16 / 9;
|
|
593
|
+
object-fit: cover;
|
|
594
|
+
border-radius: 8px;
|
|
595
|
+
display: block;
|
|
596
|
+
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/* ─── "Audio Mode" label ──────────────────────────────────────────────────── */
|
|
600
|
+
|
|
601
|
+
.rvp-audio-label {
|
|
602
|
+
font-size: 12px;
|
|
603
|
+
font-weight: 600;
|
|
604
|
+
letter-spacing: 0.08em;
|
|
605
|
+
text-transform: uppercase;
|
|
606
|
+
color: rgba(255, 255, 255, 0.5);
|
|
607
|
+
user-select: none;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/* ─── Logo fallback ───────────────────────────────────────────────────────── */
|
|
611
|
+
|
|
612
|
+
.rvp-audio-logo {
|
|
613
|
+
max-width: 100px;
|
|
614
|
+
max-height: 48px;
|
|
615
|
+
object-fit: contain;
|
|
616
|
+
filter: brightness(0) invert(1);
|
|
617
|
+
opacity: 0.55;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.rvp-audio-logo-node {
|
|
621
|
+
display: flex;
|
|
622
|
+
align-items: center;
|
|
623
|
+
justify-content: center;
|
|
624
|
+
color: rgba(255, 255, 255, 0.55);
|
|
625
|
+
max-width: 100px;
|
|
626
|
+
max-height: 48px;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/* ─── Buffering spinner ───────────────────────────────────────────────────── */
|
|
630
|
+
|
|
631
|
+
.rvp-audio-buffering-overlay {
|
|
632
|
+
position: absolute;
|
|
633
|
+
inset: 0;
|
|
634
|
+
display: flex;
|
|
635
|
+
align-items: center;
|
|
636
|
+
justify-content: center;
|
|
637
|
+
z-index: 2;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.rvp-audio-spinner {
|
|
641
|
+
width: 36px;
|
|
642
|
+
height: 36px;
|
|
643
|
+
border: 3px solid rgba(255, 255, 255, 0.18);
|
|
644
|
+
border-top-color: #fff;
|
|
645
|
+
border-radius: 50%;
|
|
646
|
+
animation: rvp-audio-spin 0.75s linear infinite;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
@keyframes rvp-audio-spin {
|
|
650
|
+
to { transform: rotate(360deg); }
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/* ─── Audio mode toggle button ────────────────────────────────────────────── */
|
|
654
|
+
|
|
655
|
+
.rvp-audio-toggle-btn {
|
|
656
|
+
display: inline-flex;
|
|
657
|
+
align-items: center;
|
|
658
|
+
gap: 6px;
|
|
659
|
+
padding: 5px 12px;
|
|
660
|
+
border: 1.5px solid rgba(255, 255, 255, 0.65);
|
|
661
|
+
border-radius: 20px;
|
|
662
|
+
background: rgba(0, 0, 0, 0.35);
|
|
663
|
+
color: #fff;
|
|
664
|
+
font-size: 12px;
|
|
665
|
+
font-weight: 600;
|
|
666
|
+
letter-spacing: 0.02em;
|
|
667
|
+
cursor: pointer;
|
|
668
|
+
transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
|
|
669
|
+
white-space: nowrap;
|
|
670
|
+
backdrop-filter: blur(4px);
|
|
671
|
+
-webkit-backdrop-filter: blur(4px);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.rvp-audio-toggle-btn:hover {
|
|
675
|
+
background: rgba(255, 255, 255, 0.15);
|
|
676
|
+
border-color: #fff;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.rvp-audio-toggle-btn:active {
|
|
680
|
+
transform: scale(0.96);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.rvp-audio-toggle-btn[aria-pressed="true"] {
|
|
684
|
+
border-color: rgba(255, 255, 255, 0.65);
|
|
685
|
+
color: #fff;
|
|
686
|
+
background: rgba(255, 255, 255, 0.12);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.rvp-audio-toggle-btn[aria-pressed="true"]:hover {
|
|
690
|
+
background: rgba(255, 255, 255, 0.2);
|
|
691
|
+
border-color: #fff;
|
|
692
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-helios",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Production-grade React video player with HLS,
|
|
3
|
+
"version": "2.5.0",
|
|
4
|
+
"description": "Production-grade React video player with HLS, audio mode, adaptive quality, live streams, subtitles, and VTT sprite thumbnail preview",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
"picture-in-picture",
|
|
46
46
|
"vtt",
|
|
47
47
|
"sprite-sheet",
|
|
48
|
-
"thumbnail-preview"
|
|
48
|
+
"thumbnail-preview",
|
|
49
|
+
"audio-mode",
|
|
50
|
+
"audio-player"
|
|
49
51
|
],
|
|
50
52
|
"author": "Sanish Manandhar <mail.sanishmanandhar@gmail.com>",
|
|
51
53
|
"license": "MIT",
|
package/dist/index.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.rvp-audio-overlay{position:absolute;inset:0;background-color:#0f0f0f;display:flex;align-items:center;justify-content:center}.rvp-audio-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;width:100%;height:100%;padding:0 24px 56px;box-sizing:border-box}.rvp-audio-artwork-wrapper{display:flex;align-items:center;justify-content:center;flex:1;min-height:0}.rvp-audio-artwork{height:100%;max-height:240px;aspect-ratio:1 / 1;object-fit:cover;border-radius:8px;box-shadow:0 8px 32px #000000b3,0 2px 8px #0006}.rvp-audio-logo{max-width:120px;max-height:64px;object-fit:contain;filter:brightness(0) invert(1);opacity:.8}.rvp-audio-logo-node{display:flex;align-items:center;justify-content:center;color:#fffc;max-width:120px;max-height:64px}.rvp-audio-badge{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#ffffff73;user-select:none}.rvp-audio-equalizer{display:flex;align-items:flex-end;gap:3px;height:40px;flex-shrink:0}.rvp-audio-bar{width:4px;border-radius:2px 2px 0 0;background:linear-gradient(to top,#ffffffe6,#ffffff80);height:5px;transform-origin:bottom;will-change:height;transition:height .15s ease}.rvp-audio-equalizer--playing .rvp-audio-bar{animation:rvp-eq-pulse var(--rvp-eq-dur, .9s) ease-in-out calc(var(--bar-index) * 45ms) infinite alternate}.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(3n+1){--rvp-eq-dur: .75s}.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(3n+2){--rvp-eq-dur: 1.05s}.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(3n){--rvp-eq-dur: .6s}.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(5n){--rvp-eq-dur: 1.2s}.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(7n){--rvp-eq-dur: .85s}@keyframes rvp-eq-pulse{0%{height:5px}20%{height:28px}45%{height:12px}70%{height:38px}85%{height:18px}to{height:32px}}@media(max-width:480px){.rvp-audio-artwork{max-height:130px}.rvp-audio-equalizer{height:28px}.rvp-audio-content{gap:16px;padding-bottom:52px}}
|
|
2
|
-
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles/AudioMode.css"],"sourcesContent":["/* ─── Audio Mode Overlay ───────────────────────────────────────────────────── */\n\n.rvp-audio-overlay {\n position: absolute;\n inset: 0;\n background-color: #0f0f0f;\n display: flex;\n align-items: center;\n justify-content: center;\n /* Sits above the video but Controls comes later in DOM so it paints on top */\n}\n\n.rvp-audio-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 100%;\n height: 100%;\n padding: 0 24px 56px; /* bottom padding reserves space for the control bar */\n box-sizing: border-box;\n}\n\n/* ─── Artwork ─────────────────────────────────────────────────────────────── */\n\n.rvp-audio-artwork-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n min-height: 0;\n}\n\n.rvp-audio-artwork {\n height: 100%;\n max-height: 240px;\n aspect-ratio: 1 / 1;\n object-fit: cover;\n border-radius: 8px;\n box-shadow:\n 0 8px 32px rgba(0, 0, 0, 0.7),\n 0 2px 8px rgba(0, 0, 0, 0.4);\n}\n\n/* Logo: smaller, shown white on the dark background */\n.rvp-audio-logo {\n max-width: 120px;\n max-height: 64px;\n object-fit: contain;\n filter: brightness(0) invert(1);\n opacity: 0.8;\n}\n\n.rvp-audio-logo-node {\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(255, 255, 255, 0.8);\n max-width: 120px;\n max-height: 64px;\n}\n\n/* ─── AUDIO ONLY badge ────────────────────────────────────────────────────── */\n\n.rvp-audio-badge {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.45);\n user-select: none;\n}\n\n/* ─── Equalizer waveform ──────────────────────────────────────────────────── */\n\n.rvp-audio-equalizer {\n display: flex;\n align-items: flex-end;\n gap: 3px;\n height: 40px;\n flex-shrink: 0;\n}\n\n.rvp-audio-bar {\n width: 4px;\n border-radius: 2px 2px 0 0;\n background: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5));\n height: 5px; /* resting height when paused */\n transform-origin: bottom;\n will-change: height;\n transition: height 0.15s ease;\n}\n\n/* ── Animate only while playing ── */\n.rvp-audio-equalizer--playing .rvp-audio-bar {\n animation: rvp-eq-pulse var(--rvp-eq-dur, 0.9s) ease-in-out\n calc(var(--bar-index) * 0.045s) infinite alternate;\n}\n\n/* Varied durations create a natural, non-repeating wave */\n.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(3n+1) { --rvp-eq-dur: 0.75s; }\n.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(3n+2) { --rvp-eq-dur: 1.05s; }\n.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(3n) { --rvp-eq-dur: 0.60s; }\n.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(5n) { --rvp-eq-dur: 1.20s; }\n.rvp-audio-equalizer--playing .rvp-audio-bar:nth-child(7n) { --rvp-eq-dur: 0.85s; }\n\n@keyframes rvp-eq-pulse {\n 0% { height: 5px; }\n 20% { height: 28px; }\n 45% { height: 12px; }\n 70% { height: 38px; }\n 85% { height: 18px; }\n 100% { height: 32px; }\n}\n\n/* ─── Responsive ──────────────────────────────────────────────────────────── */\n\n@media (max-width: 480px) {\n .rvp-audio-artwork { max-height: 130px; }\n .rvp-audio-equalizer { height: 28px; }\n .rvp-audio-content { gap: 16px; padding-bottom: 52px; }\n}\n"],"mappings":"AAEA,CAAC,kBACC,SAAU,SAHZ,MAIS,EACP,iBAAkB,QAClB,QAAS,KACT,YAAa,OACb,gBAAiB,MAEnB,CAEA,CAAC,kBACC,QAAS,KACT,eAAgB,OAChB,YAAa,OACb,gBAAiB,OACjB,IAAK,KACL,MAAO,KACP,OAAQ,KAnBV,QAoBW,EAAE,KAAK,KAChB,WAAY,UACd,CAIA,CAAC,0BACC,QAAS,KACT,YAAa,OACb,gBAAiB,OACjB,KAAM,EACN,WAAY,CACd,CAEA,CAAC,kBACC,OAAQ,KACR,WAAY,MACZ,aAAc,EAAE,EAAE,EAClB,WAAY,MAtCd,cAuCiB,IACf,WACE,EAAE,IAAI,KAAK,SAAkB,CAC7B,EAAE,IAAI,IAAK,KACf,CAGA,CAAC,eACC,UAAW,MACX,WAAY,KACZ,WAAY,QACZ,OAAQ,WAAW,GAAG,OAAO,GAC7B,QAAS,EACX,CAEA,CAAC,oBACC,QAAS,KACT,YAAa,OACb,gBAAiB,OACjB,MAAO,MACP,UAAW,MACX,WAAY,IACd,CAIA,CAAC,gBACC,QAAS,KACT,YAAa,OACb,IAAK,IACL,UAAW,KACX,YAAa,IACb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