unified-video-framework 1.4.209 → 1.4.211
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/core/dist/BasePlayer.d.ts +6 -5
- package/packages/core/dist/BasePlayer.d.ts.map +1 -1
- package/packages/core/dist/BasePlayer.js.map +1 -1
- package/packages/core/dist/VideoPlayer.js +1 -1
- package/packages/core/dist/VideoPlayer.js.map +1 -1
- package/packages/core/dist/interfaces/IVideoPlayer.d.ts +5 -3
- package/packages/core/dist/interfaces/IVideoPlayer.d.ts.map +1 -1
- package/packages/core/dist/interfaces.d.ts +26 -1
- package/packages/core/dist/interfaces.d.ts.map +1 -1
- package/packages/core/src/BasePlayer.ts +5 -5
- package/packages/core/src/VideoPlayer.ts +1 -1
- package/packages/core/src/interfaces/IVideoPlayer.ts +6 -3
- package/packages/core/src/interfaces.ts +60 -26
- package/packages/web/dist/WebPlayer.d.ts +8 -0
- package/packages/web/dist/WebPlayer.d.ts.map +1 -1
- package/packages/web/dist/WebPlayer.js +541 -36
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/dist/react/WebPlayerView.d.ts +24 -0
- package/packages/web/dist/react/WebPlayerView.d.ts.map +1 -1
- package/packages/web/dist/react/WebPlayerView.js +8 -0
- package/packages/web/dist/react/WebPlayerView.js.map +1 -1
- package/packages/web/dist/react/components/EPGOverlay-improved-positioning.d.ts.map +1 -1
- package/packages/web/dist/react/components/EPGOverlay-improved-positioning.js +0 -8
- package/packages/web/dist/react/components/EPGOverlay-improved-positioning.js.map +1 -1
- package/packages/web/dist/react/components/EPGOverlay.d.ts.map +1 -1
- package/packages/web/dist/react/components/EPGOverlay.js +0 -8
- package/packages/web/dist/react/components/EPGOverlay.js.map +1 -1
- package/packages/web/src/WebPlayer.ts +632 -41
- package/packages/web/src/react/WebPlayerView.tsx +39 -0
- package/packages/web/src/react/components/EPGOverlay-improved-positioning.tsx +0 -8
- package/packages/web/src/react/components/EPGOverlay.tsx +0 -8
|
@@ -215,6 +215,34 @@ export type WebPlayerViewProps = {
|
|
|
215
215
|
};
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
+
// Navigation Configuration
|
|
219
|
+
navigation?: {
|
|
220
|
+
backButton?: {
|
|
221
|
+
enabled?: boolean;
|
|
222
|
+
icon?: 'arrow' | 'chevron' | 'custom'; // Icon type
|
|
223
|
+
customIcon?: string; // Custom icon URL or SVG string
|
|
224
|
+
title?: string; // Button title/tooltip
|
|
225
|
+
ariaLabel?: string; // Accessibility label
|
|
226
|
+
onClick?: () => void | Promise<void>; // Custom click handler
|
|
227
|
+
href?: string; // URL to navigate to
|
|
228
|
+
replace?: boolean; // Use history.replaceState instead of navigation
|
|
229
|
+
};
|
|
230
|
+
closeButton?: {
|
|
231
|
+
enabled?: boolean;
|
|
232
|
+
icon?: 'x' | 'close' | 'custom'; // Icon type
|
|
233
|
+
customIcon?: string; // Custom icon URL or SVG string
|
|
234
|
+
title?: string; // Button title/tooltip
|
|
235
|
+
ariaLabel?: string; // Accessibility label
|
|
236
|
+
onClick?: () => void | Promise<void>; // Custom click handler
|
|
237
|
+
exitFullscreen?: boolean; // Exit fullscreen when clicked
|
|
238
|
+
closeModal?: boolean; // Hide/close player modal when clicked
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
// Navigation Event Callbacks
|
|
243
|
+
onNavigationBackClicked?: () => void; // Back button clicked
|
|
244
|
+
onNavigationCloseClicked?: () => void; // Close button clicked
|
|
245
|
+
|
|
218
246
|
// Chapter Event Callbacks
|
|
219
247
|
onChapterChange?: (chapter: any) => void; // Core chapter changed
|
|
220
248
|
onSegmentEntered?: (segment: any) => void; // Segment entered
|
|
@@ -553,6 +581,8 @@ export const WebPlayerView: React.FC<WebPlayerViewProps> = (props) => {
|
|
|
553
581
|
settings: props.settings,
|
|
554
582
|
showFrameworkBranding: props.showFrameworkBranding,
|
|
555
583
|
watermark: watermarkConfig,
|
|
584
|
+
// Navigation configuration
|
|
585
|
+
navigation: props.navigation,
|
|
556
586
|
// Chapter configuration
|
|
557
587
|
chapters: props.chapters ? {
|
|
558
588
|
enabled: props.chapters.enabled ?? false,
|
|
@@ -640,6 +670,14 @@ export const WebPlayerView: React.FC<WebPlayerViewProps> = (props) => {
|
|
|
640
670
|
(player as any).on('chaptersLoadError', props.onChaptersLoadError);
|
|
641
671
|
}
|
|
642
672
|
|
|
673
|
+
// Navigation event listeners
|
|
674
|
+
if (props.onNavigationBackClicked && typeof (player as any).on === 'function') {
|
|
675
|
+
(player as any).on('navigationBackClicked', props.onNavigationBackClicked);
|
|
676
|
+
}
|
|
677
|
+
if (props.onNavigationCloseClicked && typeof (player as any).on === 'function') {
|
|
678
|
+
(player as any).on('navigationCloseClicked', props.onNavigationCloseClicked);
|
|
679
|
+
}
|
|
680
|
+
|
|
643
681
|
props.onReady?.(player);
|
|
644
682
|
}
|
|
645
683
|
} catch (err) {
|
|
@@ -682,6 +720,7 @@ export const WebPlayerView: React.FC<WebPlayerViewProps> = (props) => {
|
|
|
682
720
|
JSON.stringify(props.settings),
|
|
683
721
|
props.showFrameworkBranding,
|
|
684
722
|
JSON.stringify(props.watermark),
|
|
723
|
+
JSON.stringify(props.navigation),
|
|
685
724
|
])
|
|
686
725
|
|
|
687
726
|
// Update free preview duration at runtime without full re-init
|
|
@@ -318,14 +318,6 @@ export const EPGOverlay: React.FC<EPGProps> = ({
|
|
|
318
318
|
if (!visible) return;
|
|
319
319
|
|
|
320
320
|
switch (e.key) {
|
|
321
|
-
case 'ArrowLeft':
|
|
322
|
-
e.preventDefault();
|
|
323
|
-
handleNavigate('left');
|
|
324
|
-
break;
|
|
325
|
-
case 'ArrowRight':
|
|
326
|
-
e.preventDefault();
|
|
327
|
-
handleNavigate('right');
|
|
328
|
-
break;
|
|
329
321
|
case 'Home':
|
|
330
322
|
e.preventDefault();
|
|
331
323
|
handleNavigate('today');
|
|
@@ -305,14 +305,6 @@ export const EPGOverlay: React.FC<EPGProps> = ({
|
|
|
305
305
|
if (!visible) return;
|
|
306
306
|
|
|
307
307
|
switch (e.key) {
|
|
308
|
-
case 'ArrowLeft':
|
|
309
|
-
e.preventDefault();
|
|
310
|
-
handleNavigate('left');
|
|
311
|
-
break;
|
|
312
|
-
case 'ArrowRight':
|
|
313
|
-
e.preventDefault();
|
|
314
|
-
handleNavigate('right');
|
|
315
|
-
break;
|
|
316
308
|
case 'Home':
|
|
317
309
|
e.preventDefault();
|
|
318
310
|
handleNavigate('today');
|