unified-video-framework 1.4.119 → 1.4.121
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/package.json +1 -1
- package/packages/web/dist/WebPlayer.d.ts +0 -3
- package/packages/web/dist/WebPlayer.d.ts.map +1 -1
- package/packages/web/dist/WebPlayer.js +22 -243
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/dist/react/WebPlayerView.d.ts.map +1 -1
- package/packages/web/dist/react/WebPlayerView.js +1 -1
- package/packages/web/dist/react/WebPlayerView.js.map +1 -1
- package/packages/web/src/WebPlayer.ts +22 -289
- package/packages/web/src/react/WebPlayerView.tsx +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-video-framework",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.121",
|
|
4
4
|
"description": "Cross-platform video player framework supporting iOS, Android, Web, Smart TVs (Samsung/LG), Roku, and more",
|
|
5
5
|
"main": "packages/core/dist/index.js",
|
|
6
6
|
"types": "packages/core/dist/index.d.ts",
|
|
@@ -82,8 +82,6 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
82
82
|
setAutoQuality(enabled: boolean): void;
|
|
83
83
|
enterFullscreen(): Promise<void>;
|
|
84
84
|
exitFullscreen(): Promise<void>;
|
|
85
|
-
isPictureInPictureSupported(): boolean;
|
|
86
|
-
private isMobileDevice;
|
|
87
85
|
enterPictureInPicture(): Promise<void>;
|
|
88
86
|
exitPictureInPicture(): Promise<void>;
|
|
89
87
|
focusPlayer(): void;
|
|
@@ -139,7 +137,6 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
139
137
|
private changeVolume;
|
|
140
138
|
private setSpeed;
|
|
141
139
|
private setQualityByLabel;
|
|
142
|
-
isPictureInPictureActive(): boolean;
|
|
143
140
|
private togglePiP;
|
|
144
141
|
private setupCastContextSafe;
|
|
145
142
|
private setupCastContext;
|
|
@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ugWarn('Failed to exit fullscreen:', error.message);
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
|
-
isPictureInPictureSupported() {
|
|
743
|
-
if (!this.video)
|
|
744
|
-
return false;
|
|
745
|
-
const hasStandardPiP = 'requestPictureInPicture' in this.video &&
|
|
746
|
-
'pictureInPictureEnabled' in document;
|
|
747
|
-
const hasSafariPiP = 'webkitSupportsPresentationMode' in this.video &&
|
|
748
|
-
typeof this.video.webkitSupportsPresentationMode === 'function' &&
|
|
749
|
-
this.video.webkitSupportsPresentationMode('picture-in-picture');
|
|
750
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
751
|
-
const isIOS = /iphone|ipad|ipod/.test(userAgent);
|
|
752
|
-
const isAndroid = /android/.test(userAgent);
|
|
753
|
-
const isChrome = /chrome/.test(userAgent) && !/edge/.test(userAgent);
|
|
754
|
-
const isSafari = /safari/.test(userAgent) && !/chrome/.test(userAgent);
|
|
755
|
-
const isFirefox = /firefox/.test(userAgent);
|
|
756
|
-
const iosSupport = isIOS && isSafari && hasSafariPiP;
|
|
757
|
-
const androidChromeSupport = isAndroid && isChrome && hasStandardPiP;
|
|
758
|
-
const firefoxSupport = isFirefox && hasStandardPiP && !this.isMobileDevice();
|
|
759
|
-
this.debugLog('PiP Support Detection:', {
|
|
760
|
-
hasStandardPiP,
|
|
761
|
-
hasSafariPiP,
|
|
762
|
-
isIOS,
|
|
763
|
-
isAndroid,
|
|
764
|
-
isChrome,
|
|
765
|
-
isSafari,
|
|
766
|
-
isFirefox,
|
|
767
|
-
iosSupport,
|
|
768
|
-
androidChromeSupport,
|
|
769
|
-
firefoxSupport,
|
|
770
|
-
overall: hasStandardPiP || iosSupport || androidChromeSupport || firefoxSupport
|
|
771
|
-
});
|
|
772
|
-
return hasStandardPiP || iosSupport || androidChromeSupport || firefoxSupport;
|
|
773
|
-
}
|
|
774
|
-
isMobileDevice() {
|
|
775
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
776
|
-
return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/.test(userAgent) ||
|
|
777
|
-
(!!(navigator.maxTouchPoints && navigator.maxTouchPoints > 2) && /macintosh/.test(userAgent));
|
|
778
|
-
}
|
|
779
742
|
async enterPictureInPicture() {
|
|
780
|
-
if (!this.video)
|
|
781
|
-
|
|
782
|
-
}
|
|
783
|
-
if (!this.isPictureInPictureSupported()) {
|
|
784
|
-
throw new Error('Picture-in-Picture not supported on this device/browser');
|
|
785
|
-
}
|
|
743
|
+
if (!this.video)
|
|
744
|
+
return;
|
|
786
745
|
try {
|
|
787
|
-
if (
|
|
746
|
+
if (this.video.requestPictureInPicture) {
|
|
788
747
|
await this.video.requestPictureInPicture();
|
|
789
|
-
this.debugLog('PiP entered using standard API');
|
|
790
|
-
return;
|
|
791
748
|
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
this.debugLog('PiP entered using WebKit API');
|
|
795
|
-
return;
|
|
749
|
+
else {
|
|
750
|
+
throw new Error('Picture-in-Picture not supported');
|
|
796
751
|
}
|
|
797
|
-
throw new Error('No supported PiP API available');
|
|
798
752
|
}
|
|
799
753
|
catch (error) {
|
|
800
|
-
|
|
754
|
+
console.error('Failed to enter PiP:', error);
|
|
801
755
|
throw error;
|
|
802
756
|
}
|
|
803
757
|
}
|
|
804
758
|
async exitPictureInPicture() {
|
|
805
759
|
try {
|
|
806
|
-
|
|
807
|
-
const inWebkitPiP = this.video &&
|
|
808
|
-
'webkitPresentationMode' in this.video &&
|
|
809
|
-
this.video.webkitPresentationMode === 'picture-in-picture';
|
|
810
|
-
if (!inStandardPiP && !inWebkitPiP) {
|
|
811
|
-
this.debugLog('Not currently in PiP mode');
|
|
812
|
-
return;
|
|
813
|
-
}
|
|
814
|
-
if (inStandardPiP && 'exitPictureInPicture' in document) {
|
|
760
|
+
if (document.exitPictureInPicture) {
|
|
815
761
|
await document.exitPictureInPicture();
|
|
816
|
-
this.debugLog('PiP exited using standard API');
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
if (inWebkitPiP && this.video && 'webkitSetPresentationMode' in this.video) {
|
|
820
|
-
this.video.webkitSetPresentationMode('inline');
|
|
821
|
-
this.debugLog('PiP exited using WebKit API');
|
|
822
|
-
return;
|
|
823
762
|
}
|
|
824
763
|
}
|
|
825
764
|
catch (error) {
|
|
@@ -1523,48 +1462,18 @@ export class WebPlayer extends BasePlayer {
|
|
|
1523
1462
|
aspect-ratio: 16 / 9;
|
|
1524
1463
|
background: radial-gradient(ellipse at center, #1a1a2e 0%, #000 100%);
|
|
1525
1464
|
overflow: hidden;
|
|
1526
|
-
display: flex;
|
|
1527
|
-
align-items: center;
|
|
1528
|
-
justify-content: center;
|
|
1529
1465
|
}
|
|
1530
1466
|
|
|
1531
1467
|
.uvf-video {
|
|
1532
1468
|
position: absolute;
|
|
1533
|
-
top:
|
|
1534
|
-
left:
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
max-height: 100%;
|
|
1538
|
-
width: auto;
|
|
1539
|
-
height: auto;
|
|
1469
|
+
top: 0;
|
|
1470
|
+
left: 0;
|
|
1471
|
+
width: 100%;
|
|
1472
|
+
height: 100%;
|
|
1540
1473
|
background: #000;
|
|
1541
1474
|
object-fit: contain;
|
|
1542
|
-
/* Ensure
|
|
1543
|
-
object-position: center;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
/* Mobile-specific video centering improvements */
|
|
1547
|
-
@media screen and (max-width: 767px) {
|
|
1548
|
-
.uvf-video {
|
|
1549
|
-
/* Force full width/height on mobile for better centering */
|
|
1550
|
-
width: 100%;
|
|
1551
|
-
height: 100%;
|
|
1552
|
-
top: 0;
|
|
1553
|
-
left: 0;
|
|
1554
|
-
transform: none;
|
|
1555
|
-
object-fit: contain;
|
|
1556
|
-
object-position: center;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
.uvf-video-container {
|
|
1560
|
-
/* Remove aspect ratio constraint on mobile for full height usage */
|
|
1561
|
-
aspect-ratio: unset;
|
|
1562
|
-
min-height: 100%;
|
|
1563
|
-
height: 100%;
|
|
1564
|
-
display: flex;
|
|
1565
|
-
align-items: center;
|
|
1566
|
-
justify-content: center;
|
|
1567
|
-
}
|
|
1475
|
+
/* Ensure the video is visually centered inside the container on all devices */
|
|
1476
|
+
object-position: center center;
|
|
1568
1477
|
}
|
|
1569
1478
|
|
|
1570
1479
|
.uvf-watermark-layer {
|
|
@@ -1717,7 +1626,8 @@ export class WebPlayer extends BasePlayer {
|
|
|
1717
1626
|
left: 0;
|
|
1718
1627
|
right: 0;
|
|
1719
1628
|
padding: 20px;
|
|
1720
|
-
|
|
1629
|
+
/* Keep controls above any video overlays */
|
|
1630
|
+
z-index: 2147483602;
|
|
1721
1631
|
opacity: 0;
|
|
1722
1632
|
transform: translateY(10px);
|
|
1723
1633
|
transition: all 0.3s ease;
|
|
@@ -2192,7 +2102,8 @@ export class WebPlayer extends BasePlayer {
|
|
|
2192
2102
|
position: absolute;
|
|
2193
2103
|
top: 20px;
|
|
2194
2104
|
right: 20px;
|
|
2195
|
-
|
|
2105
|
+
/* Ensure top controls remain above chrome/toolbars */
|
|
2106
|
+
z-index: 2147483602;
|
|
2196
2107
|
display: flex;
|
|
2197
2108
|
align-items: center;
|
|
2198
2109
|
gap: 12px;
|
|
@@ -2687,10 +2598,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
2687
2598
|
@media screen and (max-width: 767px) {
|
|
2688
2599
|
html, body {
|
|
2689
2600
|
overflow-x: hidden;
|
|
2690
|
-
/* Prevent iOS Safari address bar bounce */
|
|
2691
|
-
position: fixed;
|
|
2692
|
-
height: 100%;
|
|
2693
|
-
width: 100%;
|
|
2694
2601
|
}
|
|
2695
2602
|
|
|
2696
2603
|
.uvf-player-wrapper {
|
|
@@ -2700,23 +2607,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
2700
2607
|
|
|
2701
2608
|
/* Prevent zoom on double tap */
|
|
2702
2609
|
touch-action: manipulation;
|
|
2703
|
-
|
|
2704
|
-
/* Ensure full viewport usage */
|
|
2705
|
-
position: relative;
|
|
2706
|
-
width: 100vw;
|
|
2707
|
-
height: 100vh;
|
|
2708
|
-
|
|
2709
|
-
/* iOS Safari fix for viewport height */
|
|
2710
|
-
min-height: -webkit-fill-available;
|
|
2711
|
-
}
|
|
2712
|
-
|
|
2713
|
-
.uvf-video-container {
|
|
2714
|
-
/* Full viewport container */
|
|
2715
|
-
width: 100vw;
|
|
2716
|
-
height: 100vh;
|
|
2717
|
-
min-height: -webkit-fill-available;
|
|
2718
|
-
position: relative;
|
|
2719
|
-
overflow: hidden;
|
|
2720
2610
|
}
|
|
2721
2611
|
|
|
2722
2612
|
.uvf-video {
|
|
@@ -2729,38 +2619,12 @@ export class WebPlayer extends BasePlayer {
|
|
|
2729
2619
|
/* Ensure hardware acceleration */
|
|
2730
2620
|
-webkit-transform: translateZ(0);
|
|
2731
2621
|
transform: translateZ(0);
|
|
2732
|
-
|
|
2733
|
-
/* Full viewport video with proper centering */
|
|
2734
|
-
width: 100%;
|
|
2735
|
-
height: 100%;
|
|
2736
|
-
object-fit: contain;
|
|
2737
|
-
object-position: center center;
|
|
2738
2622
|
}
|
|
2739
2623
|
|
|
2740
2624
|
/* Fix for controls being cut off by virtual keyboard */
|
|
2741
2625
|
.uvf-controls-bar {
|
|
2742
2626
|
position: fixed !important;
|
|
2743
2627
|
bottom: var(--uvf-safe-area-bottom, 0) !important;
|
|
2744
|
-
left: var(--uvf-safe-area-left, 0) !important;
|
|
2745
|
-
right: var(--uvf-safe-area-right, 0) !important;
|
|
2746
|
-
width: auto !important;
|
|
2747
|
-
z-index: 9999;
|
|
2748
|
-
}
|
|
2749
|
-
|
|
2750
|
-
/* Top controls safe area positioning */
|
|
2751
|
-
.uvf-top-controls {
|
|
2752
|
-
position: fixed !important;
|
|
2753
|
-
top: var(--uvf-safe-area-top, 10px) !important;
|
|
2754
|
-
right: var(--uvf-safe-area-right, 10px) !important;
|
|
2755
|
-
z-index: 9999;
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
.uvf-title-bar {
|
|
2759
|
-
position: fixed !important;
|
|
2760
|
-
top: var(--uvf-safe-area-top, 10px) !important;
|
|
2761
|
-
left: var(--uvf-safe-area-left, 10px) !important;
|
|
2762
|
-
right: calc(120px + var(--uvf-safe-area-right, 10px)) !important; /* Leave space for top controls */
|
|
2763
|
-
z-index: 9999;
|
|
2764
2628
|
}
|
|
2765
2629
|
|
|
2766
2630
|
/* Ensure controls stay above virtual keyboards */
|
|
@@ -2769,61 +2633,6 @@ export class WebPlayer extends BasePlayer {
|
|
|
2769
2633
|
bottom: max(var(--uvf-safe-area-bottom, 0), env(keyboard-inset-height, 0)) !important;
|
|
2770
2634
|
}
|
|
2771
2635
|
}
|
|
2772
|
-
|
|
2773
|
-
/* Enhanced safe area support for newer devices */
|
|
2774
|
-
@supports (padding: max(0px)) {
|
|
2775
|
-
.uvf-controls-bar {
|
|
2776
|
-
padding-bottom: max(16px, calc(16px + var(--uvf-safe-area-bottom, 0)));
|
|
2777
|
-
padding-left: max(12px, calc(12px + var(--uvf-safe-area-left, 0)));
|
|
2778
|
-
padding-right: max(12px, calc(12px + var(--uvf-safe-area-right, 0)));
|
|
2779
|
-
}
|
|
2780
|
-
|
|
2781
|
-
.uvf-top-controls {
|
|
2782
|
-
top: max(10px, calc(10px + var(--uvf-safe-area-top, 0))) !important;
|
|
2783
|
-
right: max(10px, calc(10px + var(--uvf-safe-area-right, 0))) !important;
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
.uvf-title-bar {
|
|
2787
|
-
top: max(10px, calc(10px + var(--uvf-safe-area-top, 0))) !important;
|
|
2788
|
-
left: max(10px, calc(10px + var(--uvf-safe-area-left, 0))) !important;
|
|
2789
|
-
}
|
|
2790
|
-
}
|
|
2791
|
-
}
|
|
2792
|
-
|
|
2793
|
-
/* Specific fixes for iPhone X series and newer with notches */
|
|
2794
|
-
@media screen and (max-width: 767px) and (orientation: portrait) {
|
|
2795
|
-
@supports (top: env(safe-area-inset-top)) {
|
|
2796
|
-
.uvf-responsive-container,
|
|
2797
|
-
.uvf-player-wrapper,
|
|
2798
|
-
.uvf-video-container {
|
|
2799
|
-
height: 100vh;
|
|
2800
|
-
height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
|
|
2801
|
-
}
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
|
-
/* Landscape orientation fixes for mobile */
|
|
2806
|
-
@media screen and (max-width: 767px) and (orientation: landscape) {
|
|
2807
|
-
html, body {
|
|
2808
|
-
height: 100vh;
|
|
2809
|
-
overflow: hidden;
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
.uvf-responsive-container,
|
|
2813
|
-
.uvf-player-wrapper,
|
|
2814
|
-
.uvf-video-container {
|
|
2815
|
-
height: 100vh;
|
|
2816
|
-
width: 100vw;
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
@supports (height: 100dvh) {
|
|
2820
|
-
.uvf-responsive-container,
|
|
2821
|
-
.uvf-player-wrapper,
|
|
2822
|
-
.uvf-video-container {
|
|
2823
|
-
height: 100dvh;
|
|
2824
|
-
width: 100dvw;
|
|
2825
|
-
}
|
|
2826
|
-
}
|
|
2827
2636
|
}
|
|
2828
2637
|
|
|
2829
2638
|
/* Enhanced Responsive Media Queries with UX Best Practices */
|
|
@@ -2875,7 +2684,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
2875
2684
|
padding-right: calc(12px + var(--uvf-safe-area-right));
|
|
2876
2685
|
background: linear-gradient(to top, var(--uvf-overlay-strong) 0%, var(--uvf-overlay-medium) 80%, var(--uvf-overlay-transparent) 100%);
|
|
2877
2686
|
box-sizing: border-box;
|
|
2878
|
-
z-index:
|
|
2687
|
+
z-index: 2147483602;
|
|
2879
2688
|
}
|
|
2880
2689
|
|
|
2881
2690
|
.uvf-progress-section {
|
|
@@ -3259,7 +3068,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
3259
3068
|
padding-right: calc(12px + var(--uvf-safe-area-right));
|
|
3260
3069
|
background: linear-gradient(to top, var(--uvf-overlay-strong) 0%, var(--uvf-overlay-medium) 80%, var(--uvf-overlay-transparent) 100%);
|
|
3261
3070
|
box-sizing: border-box;
|
|
3262
|
-
z-index:
|
|
3071
|
+
z-index: 2147483602;
|
|
3263
3072
|
}
|
|
3264
3073
|
|
|
3265
3074
|
.uvf-progress-section {
|
|
@@ -4136,13 +3945,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
4136
3945
|
pipBtn.id = 'uvf-pip-btn';
|
|
4137
3946
|
pipBtn.title = 'Picture-in-Picture';
|
|
4138
3947
|
pipBtn.innerHTML = '<svg viewBox="0 0 24 24"><path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14z"/></svg>';
|
|
4139
|
-
|
|
4140
|
-
rightControls.appendChild(pipBtn);
|
|
4141
|
-
this.debugLog('PiP button added - support detected');
|
|
4142
|
-
}
|
|
4143
|
-
else {
|
|
4144
|
-
this.debugLog('PiP button not added - no support detected');
|
|
4145
|
-
}
|
|
3948
|
+
rightControls.appendChild(pipBtn);
|
|
4146
3949
|
const fullscreenBtn = document.createElement('button');
|
|
4147
3950
|
fullscreenBtn.className = 'uvf-control-btn';
|
|
4148
3951
|
fullscreenBtn.id = 'uvf-fullscreen-btn';
|
|
@@ -5255,41 +5058,17 @@ export class WebPlayer extends BasePlayer {
|
|
|
5255
5058
|
this.setAutoQuality(true);
|
|
5256
5059
|
}
|
|
5257
5060
|
}
|
|
5258
|
-
isPictureInPictureActive() {
|
|
5259
|
-
const inStandardPiP = !!document.pictureInPictureElement;
|
|
5260
|
-
const inWebkitPiP = !!(this.video &&
|
|
5261
|
-
'webkitPresentationMode' in this.video &&
|
|
5262
|
-
this.video.webkitPresentationMode === 'picture-in-picture');
|
|
5263
|
-
return inStandardPiP || inWebkitPiP;
|
|
5264
|
-
}
|
|
5265
5061
|
async togglePiP() {
|
|
5266
|
-
if (!this.isPictureInPictureSupported()) {
|
|
5267
|
-
this.showShortcutIndicator('PiP not supported');
|
|
5268
|
-
this.debugWarn('PiP not supported on this device/browser');
|
|
5269
|
-
return;
|
|
5270
|
-
}
|
|
5271
5062
|
try {
|
|
5272
|
-
if (
|
|
5063
|
+
if (document.pictureInPictureElement) {
|
|
5273
5064
|
await this.exitPictureInPicture();
|
|
5274
|
-
this.showShortcutIndicator('Exit PiP');
|
|
5275
|
-
this.debugLog('PiP deactivated');
|
|
5276
5065
|
}
|
|
5277
5066
|
else {
|
|
5278
5067
|
await this.enterPictureInPicture();
|
|
5279
|
-
this.showShortcutIndicator('Enter PiP');
|
|
5280
|
-
this.debugLog('PiP activated');
|
|
5281
5068
|
}
|
|
5282
5069
|
}
|
|
5283
5070
|
catch (error) {
|
|
5284
|
-
|
|
5285
|
-
this.showShortcutIndicator(`PiP Error: ${errorMessage}`);
|
|
5286
|
-
this.debugError('PiP toggle failed:', errorMessage);
|
|
5287
|
-
if (errorMessage.includes('not supported')) {
|
|
5288
|
-
this.showShortcutIndicator('PiP not supported');
|
|
5289
|
-
}
|
|
5290
|
-
else if (errorMessage.includes('user gesture')) {
|
|
5291
|
-
this.showShortcutIndicator('PiP requires user interaction');
|
|
5292
|
-
}
|
|
5071
|
+
console.error('PiP toggle failed:', error);
|
|
5293
5072
|
}
|
|
5294
5073
|
}
|
|
5295
5074
|
setupCastContextSafe() {
|