@therealtinhtute/baroiplayer 1.0.8 → 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/LICENSE +2 -2
- package/README.md +15 -15
- package/dist/context/media.js +2 -0
- package/dist/context/media.js.map +1 -0
- package/dist/context/media.mjs +15 -0
- package/dist/context/media.mjs.map +1 -0
- package/dist/context/store.js +2 -0
- package/dist/context/store.js.map +1 -0
- package/dist/context/store.mjs +5 -0
- package/dist/context/store.mjs.map +1 -0
- package/dist/context-BYwDoSRX.js +1172 -0
- package/dist/context-BYwDoSRX.js.map +1 -0
- package/dist/context-eNS62_ac.cjs +23 -0
- package/dist/context-eNS62_ac.cjs.map +1 -0
- package/dist/core-events-B1iM2F46.cjs +2 -0
- package/dist/core-events-B1iM2F46.cjs.map +1 -0
- package/dist/core-events-DunPHKRE.js +484 -0
- package/dist/core-events-DunPHKRE.js.map +1 -0
- package/dist/core-plugins-CROGvQUy.js +686 -0
- package/dist/core-plugins-CROGvQUy.js.map +1 -0
- package/dist/core-plugins-DtsHBOtF.cjs +2 -0
- package/dist/core-plugins-DtsHBOtF.cjs.map +1 -0
- package/dist/core.js +37 -0
- package/dist/core.js.map +1 -0
- package/dist/core.mjs +1233 -0
- package/dist/core.mjs.map +1 -0
- package/dist/enhanced-components-DUw2KrmQ.js +1142 -0
- package/dist/enhanced-components-DUw2KrmQ.js.map +1 -0
- package/dist/enhanced-components-DXBCHU0v.cjs +2 -0
- package/dist/enhanced-components-DXBCHU0v.cjs.map +1 -0
- package/dist/hooks-BW-JjVgP.cjs +4 -0
- package/dist/hooks-BW-JjVgP.cjs.map +1 -0
- package/dist/hooks-CyX6De5M.js +1693 -0
- package/dist/hooks-CyX6De5M.js.map +1 -0
- package/dist/index.css +1 -102
- package/dist/index.js +112 -21
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +6275 -16
- package/dist/index.mjs.map +1 -0
- package/dist/minimal-components-Bdcpxav5.cjs +2 -0
- package/dist/minimal-components-Bdcpxav5.cjs.map +1 -0
- package/dist/minimal-components-DlRK7Qu_.js +1927 -0
- package/dist/minimal-components-DlRK7Qu_.js.map +1 -0
- package/dist/minimal-components.css +1 -589
- package/dist/mona-loading.gif +0 -0
- package/dist/performance-monitor-C5k6FDXw.js +301 -0
- package/dist/performance-monitor-C5k6FDXw.js.map +1 -0
- package/dist/performance-monitor-lJmuUjQQ.cjs +2 -0
- package/dist/performance-monitor-lJmuUjQQ.cjs.map +1 -0
- package/dist/utils-CFOue_9K.cjs +9 -0
- package/dist/utils-CFOue_9K.cjs.map +1 -0
- package/dist/utils-Dzpl2ArK.js +2844 -0
- package/dist/utils-Dzpl2ArK.js.map +1 -0
- package/dist/utils.js +2 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +11 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +11 -40
- package/src/adapters/videojs-adapter.tsx +441 -441
- package/src/components/AnimateLoading.tsx +85 -93
- package/src/components/LoadingState.tsx +199 -208
- package/src/components/__tests__/media-player-accessibility.test.tsx +510 -0
- package/src/components/__tests__/media-player-react19.test.tsx +457 -0
- package/src/components/accessibility/keyboard-help-overlay.tsx +199 -207
- package/src/components/basic/index.ts +28 -28
- package/src/components/enhanced/advanced-features.tsx +49 -54
- package/src/components/enhanced/debug-panel.tsx +148 -122
- package/src/components/enhanced/enhanced-controls.tsx +117 -120
- package/src/components/enhanced/enhanced-media-player.tsx +228 -214
- package/src/components/enhanced/error-handling.tsx +50 -57
- package/src/components/enhanced/index.ts +27 -27
- package/src/components/enhanced/media-player-enhanced.tsx +117 -83
- package/src/components/examples/basic-video-player.tsx +35 -40
- package/src/components/examples/enhanced-controls-example.tsx +16 -30
- package/src/components/examples/enhanced-media-player-example.tsx +196 -187
- package/src/components/examples/loading-states-demo.tsx +113 -113
- package/src/components/examples/react-19-demo.tsx +88 -116
- package/src/components/examples/volume-orientation-demo.tsx +77 -85
- package/src/components/icon-demo.tsx +189 -202
- package/src/components/icons/svg-icons/ArrowLeftIcon.tsx +13 -13
- package/src/components/icons/svg-icons/ArrowRightIcon.tsx +13 -13
- package/src/components/icons/svg-icons/AudioIcon.tsx +16 -16
- package/src/components/icons/svg-icons/BackwardIcon.tsx +7 -7
- package/src/components/icons/svg-icons/CameraIcon.tsx +13 -13
- package/src/components/icons/svg-icons/CheckIcon.tsx +13 -13
- package/src/components/icons/svg-icons/EnablePiPIcon.tsx +13 -13
- package/src/components/icons/svg-icons/ForwardIcon.tsx +7 -7
- package/src/components/icons/svg-icons/FullscreenEnterIcon.tsx +18 -18
- package/src/components/icons/svg-icons/FullscreenExitIcon.tsx +18 -18
- package/src/components/icons/svg-icons/LoadingIcon.tsx +27 -27
- package/src/components/icons/svg-icons/PauseIcon.tsx +18 -18
- package/src/components/icons/svg-icons/PlayIcon.tsx +16 -16
- package/src/components/icons/svg-icons/PlaybackSpeedIcon.tsx +18 -18
- package/src/components/icons/svg-icons/QualityIcon.tsx +16 -16
- package/src/components/icons/svg-icons/SettingsIcon.tsx +7 -7
- package/src/components/icons/svg-icons/SliderIcon.tsx +16 -16
- package/src/components/icons/svg-icons/SubtitleIcon.tsx +16 -16
- package/src/components/icons/svg-icons/SubtitleOffIcon.tsx +20 -20
- package/src/components/icons/svg-icons/UnPiPIcon.tsx +13 -13
- package/src/components/icons/svg-icons/VolumeMutedIcon.tsx +11 -11
- package/src/components/icons/svg-icons/VolumeOneIcon.tsx +17 -17
- package/src/components/icons/svg-icons/VolumeThreeIcon.tsx +11 -11
- package/src/components/icons/svg-icons/VolumeTwoIcon.tsx +11 -11
- package/src/components/legacy.tsx +8 -14
- package/src/components/media-metadata-display.tsx +78 -79
- package/src/components/media-player-controls.tsx +37 -40
- package/src/components/media-player-error.tsx +2 -2
- package/src/components/media-player-fullscreen.tsx +2 -2
- package/src/components/media-player-hls.tsx +89 -89
- package/src/components/media-player-play.tsx +2 -2
- package/src/components/media-player-root.tsx +20 -22
- package/src/components/media-player-seek.tsx +1 -1
- package/src/components/media-player-tooltip.tsx +1 -1
- package/src/components/media-player-video.tsx +28 -6
- package/src/components/media-player-volume.tsx +3 -3
- package/src/components/media-player.tsx +209 -174
- package/src/components/media-suspense.tsx +71 -89
- package/src/components/player-settings-form.tsx +143 -148
- package/src/components/react-player-wrapper.tsx +23 -23
- package/src/components/simple-video-player.tsx +53 -51
- package/src/components/ui/blur-poster.tsx +93 -0
- package/src/components/ui/empty-state.tsx +91 -0
- package/src/components/ui/enhanced-seek-bar.tsx +75 -56
- package/src/components/ui/error-state.tsx +124 -0
- package/src/components/ui/fullscreen-button.tsx +71 -50
- package/src/components/ui/loading-skeleton.tsx +107 -0
- package/src/components/ui/media-resource-preloader.tsx +265 -198
- package/src/components/ui/offline-message.tsx +98 -0
- package/src/components/ui/play-button.tsx +79 -87
- package/src/components/ui/seek-bar.tsx +170 -140
- package/src/components/ui/time-display.tsx +33 -12
- package/src/components/ui/volume-control.tsx +91 -44
- package/src/components/unified/base-media-player.tsx +45 -51
- package/src/components/unified/media-player.tsx +3 -3
- package/src/components/variants/minimal/AccessibleMinimalPlayer.tsx +508 -502
- package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.tsx +108 -87
- package/src/components/variants/minimal/MinimalControls.tsx +100 -118
- package/src/components/variants/minimal/MinimalLoading.tsx +19 -23
- package/src/components/variants/minimal/MinimalMediaPlayer.tsx +283 -280
- package/src/components/variants/minimal/MinimalOverlay.tsx +43 -49
- package/src/components/variants/minimal/MinimalPlayButton.tsx +44 -53
- package/src/components/variants/minimal/MinimalSeekBar.tsx +130 -140
- package/src/components/variants/minimal/MinimalVolumeControl.tsx +59 -64
- package/src/components/variants/minimal/SimpleMinimalPlayer.tsx +29 -32
- package/src/components/variants/minimal/components/CenterPlayButton.tsx +1 -1
- package/src/components/variants/minimal/components/ControlBar.tsx +7 -11
- package/src/components/variants/minimal/components/EnhancedSettingsMenu.tsx +381 -330
- package/src/components/variants/minimal/components/PlaybackControls.tsx +6 -11
- package/src/components/variants/minimal/components/RightControls.tsx +8 -17
- package/src/components/variants/minimal/components/SeekBar.tsx +16 -20
- package/src/components/variants/minimal/components/SettingsDropdown.tsx +12 -14
- package/src/components/variants/minimal/components/SubtitleDisplay.tsx +1 -1
- package/src/components/variants/minimal/components/TimeDisplay.tsx +2 -5
- package/src/components/variants/minimal/components/VideoElement.tsx +3 -10
- package/src/components/variants/minimal/components/VolumeControl.tsx +42 -39
- package/src/components/video-player.tsx +10 -10
- package/src/context/__tests__/media-store.test.ts +509 -0
- package/src/context/error-handling.ts +106 -102
- package/src/context/media-context.tsx +56 -10
- package/src/context/media-provider.tsx +16 -17
- package/src/context/media-store.ts +68 -60
- package/src/context/persistence.ts +74 -65
- package/src/core/events/event-system.ts +422 -416
- package/src/core/events/hooks.ts +275 -252
- package/src/core/events/index.ts +14 -14
- package/src/core/events/middleware.ts +269 -252
- package/src/core/index.ts +8 -8
- package/src/core/optimization/bundle-optimizer.tsx +65 -60
- package/src/core/performance/cicd.ts +91 -89
- package/src/core/performance/index.ts +22 -22
- package/src/core/performance/media-loading-optimizer.ts +518 -512
- package/src/core/performance/performance-budgets.ts +414 -409
- package/src/core/performance/performance-monitor.tsx +451 -439
- package/src/core/performance/performance-testing.ts +439 -437
- package/src/core/plugins/__tests__/registry.test.ts +595 -0
- package/src/core/plugins/base-plugin.ts +197 -196
- package/src/core/plugins/enhanced-plugin-system.ts +136 -136
- package/src/core/plugins/examples/analytics-plugin.ts +229 -230
- package/src/core/plugins/index.ts +26 -26
- package/src/core/plugins/registry.ts +315 -323
- package/src/core/plugins/types.ts +97 -105
- package/src/core/plugins/utils.ts +292 -291
- package/src/core/progressive-loading.tsx +297 -288
- package/src/core/providers/enhanced-hls-provider.ts +118 -90
- package/src/core/providers/lazy-provider.tsx +51 -0
- package/src/core/providers/service-provider.tsx +104 -108
- package/src/core/utils.tsx +22 -26
- package/src/features/media-session/media-session-manager.ts +406 -402
- package/src/features/picture-in-picture/pip-manager.ts +364 -365
- package/src/features/playlist/playlist-manager.ts +597 -585
- package/src/features/subtitles/subtitle-manager.ts +424 -430
- package/src/features/subtitles/subtitle-parser.ts +274 -273
- package/src/features/thumbnails/thumbnail-generator.ts +504 -502
- package/src/hooks/__tests__/use-media-player.test.ts +712 -0
- package/src/hooks/__tests__/use-media-state.test.tsx +316 -0
- package/src/hooks/accessibility/index.ts +20 -20
- package/src/hooks/accessibility/use-accessibility-preferences.ts +177 -175
- package/src/hooks/accessibility/use-focus-management.ts +170 -163
- package/src/hooks/accessibility/use-keyboard-shortcuts.ts +132 -124
- package/src/hooks/accessibility/use-screen-reader.ts +191 -161
- package/src/hooks/core/index.ts +30 -30
- package/src/hooks/legacy.ts +3 -9
- package/src/hooks/use-buffer-health.ts +218 -0
- package/src/hooks/use-enhanced-media-player.ts +74 -82
- package/src/hooks/use-focus-trap.tsx +162 -0
- package/src/hooks/use-intelligent-preloading.ts +236 -232
- package/src/hooks/use-keyboard-controls.ts +80 -80
- package/src/hooks/use-keyboard-shortcuts.ts +255 -0
- package/src/hooks/use-media-actions.ts +81 -72
- package/src/hooks/use-media-metadata.ts +75 -73
- package/src/hooks/use-media-optimistic.ts +145 -151
- package/src/hooks/use-media-player.ts +109 -107
- package/src/hooks/use-media-state.ts +63 -59
- package/src/hooks/use-memory-optimization.ts +119 -117
- package/src/hooks/use-network-status.ts +124 -0
- package/src/hooks/use-optimistic-controls.ts +91 -88
- package/src/hooks/use-optimized-media.ts +76 -56
- package/src/hooks/use-smart-preload.ts +230 -0
- package/src/hooks/use-touch-gestures.ts +427 -383
- package/src/hooks/useEnhancedSubtitles.ts +245 -245
- package/src/hooks/useKeyboardShortcuts.ts +52 -52
- package/src/hooks/useMediaControls.ts +22 -22
- package/src/hooks/useScreenshot.ts +51 -47
- package/src/hooks/useSubtitles.ts +53 -53
- package/src/hooks/useVideoPlayer.ts +61 -61
- package/src/icons/components/FullscreenIcon.tsx +34 -35
- package/src/icons/components/SettingsIcon.tsx +35 -36
- package/src/icons/components/animated/LoadingIcon.tsx +25 -41
- package/src/icons/components/animated/PlayPauseIcon.tsx +38 -46
- package/src/icons/components/media/PauseIcon.tsx +36 -37
- package/src/icons/components/media/PlayIcon.tsx +35 -36
- package/src/icons/components/volume/VolumeIcon.tsx +36 -37
- package/src/icons/components/volume/VolumeOffIcon.tsx +36 -37
- package/src/icons/index.ts +38 -38
- package/src/icons/provider.tsx +40 -46
- package/src/icons/types.ts +51 -31
- package/src/index-enhanced.ts +10 -10
- package/src/index-legacy.ts +3 -4
- package/src/index.css +80 -80
- package/src/index.ts +8 -23
- package/src/lib/__tests__/async-utils.test.ts +291 -0
- package/src/lib/async-utils.ts +194 -0
- package/src/lib/deprecation.ts +4 -4
- package/src/lib/index.ts +3 -2
- package/src/lib/utils.ts +3 -3
- package/src/styles/globals.css +3 -3
- package/src/styles/minimal-player.css +606 -574
- package/src/styles/pixel-art.css +23 -28
- package/src/styles/videojs.css +43 -43
- package/src/test/accessibility-utils.ts +208 -0
- package/src/test/browser-simulation.ts +235 -0
- package/src/test/media-mocks.ts +156 -0
- package/src/test/performance-utils.ts +192 -0
- package/src/test/setup.ts +241 -44
- package/src/types/events.ts +30 -30
- package/src/types/formats.ts +56 -72
- package/src/types/index.ts +5 -40
- package/src/types/videojs-plugins.d.ts +6 -6
- package/dist/index.d.ts +0 -1425
- package/dist/package.json +0 -62
- package/dist/src/adapters/videojs-adapter.d.ts +0 -38
- package/dist/src/adapters/videojs-adapter.tsx +0 -470
- package/dist/src/components/AnimateLoading.d.ts +0 -9
- package/dist/src/components/AnimateLoading.tsx +0 -115
- package/dist/src/components/LoadingState.d.ts +0 -33
- package/dist/src/components/LoadingState.tsx +0 -248
- package/dist/src/components/accessibility/keyboard-help-overlay.d.ts +0 -17
- package/dist/src/components/accessibility/keyboard-help-overlay.tsx +0 -213
- package/dist/src/components/audio-player.d.ts +0 -3
- package/dist/src/components/audio-player.tsx +0 -85
- package/dist/src/components/basic/index.d.ts +0 -26
- package/dist/src/components/basic/index.ts +0 -37
- package/dist/src/components/enhanced/advanced-features.d.ts +0 -45
- package/dist/src/components/enhanced/advanced-features.tsx +0 -316
- package/dist/src/components/enhanced/debug-panel.d.ts +0 -70
- package/dist/src/components/enhanced/debug-panel.tsx +0 -422
- package/dist/src/components/enhanced/enhanced-controls.d.ts +0 -50
- package/dist/src/components/enhanced/enhanced-controls.tsx +0 -600
- package/dist/src/components/enhanced/enhanced-media-player.d.ts +0 -26
- package/dist/src/components/enhanced/enhanced-media-player.tsx +0 -509
- package/dist/src/components/enhanced/error-handling.d.ts +0 -36
- package/dist/src/components/enhanced/error-handling.tsx +0 -345
- package/dist/src/components/enhanced/index.d.ts +0 -7
- package/dist/src/components/enhanced/index.ts +0 -39
- package/dist/src/components/enhanced/media-player-enhanced.d.ts +0 -21
- package/dist/src/components/enhanced/media-player-enhanced.tsx +0 -349
- package/dist/src/components/examples/basic-video-player.d.ts +0 -10
- package/dist/src/components/examples/basic-video-player.tsx +0 -55
- package/dist/src/components/examples/custom-controls-example.d.ts +0 -10
- package/dist/src/components/examples/custom-controls-example.tsx +0 -63
- package/dist/src/components/examples/enhanced-controls-example.d.ts +0 -9
- package/dist/src/components/examples/enhanced-controls-example.tsx +0 -114
- package/dist/src/components/examples/enhanced-media-player-example.d.ts +0 -9
- package/dist/src/components/examples/enhanced-media-player-example.tsx +0 -293
- package/dist/src/components/examples/loading-states-demo.d.ts +0 -2
- package/dist/src/components/examples/loading-states-demo.tsx +0 -142
- package/dist/src/components/examples/react-19-demo.d.ts +0 -10
- package/dist/src/components/examples/react-19-demo.tsx +0 -381
- package/dist/src/components/examples/volume-orientation-demo.d.ts +0 -2
- package/dist/src/components/examples/volume-orientation-demo.tsx +0 -114
- package/dist/src/components/icon-demo.d.ts +0 -2
- package/dist/src/components/icon-demo.tsx +0 -209
- package/dist/src/components/icons/index.d.ts +0 -36
- package/dist/src/components/icons/index.tsx +0 -166
- package/dist/src/components/icons/svg-icons/ArrowLeftIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/ArrowLeftIcon.tsx +0 -18
- package/dist/src/components/icons/svg-icons/ArrowRightIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/ArrowRightIcon.tsx +0 -18
- package/dist/src/components/icons/svg-icons/AudioIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/AudioIcon.tsx +0 -22
- package/dist/src/components/icons/svg-icons/BackwardIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/BackwardIcon.tsx +0 -12
- package/dist/src/components/icons/svg-icons/CameraIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/CameraIcon.tsx +0 -19
- package/dist/src/components/icons/svg-icons/CheckIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/CheckIcon.tsx +0 -19
- package/dist/src/components/icons/svg-icons/EnablePiPIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/EnablePiPIcon.tsx +0 -17
- package/dist/src/components/icons/svg-icons/ForwardIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/ForwardIcon.tsx +0 -12
- package/dist/src/components/icons/svg-icons/FullscreenEnterIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/FullscreenEnterIcon.tsx +0 -23
- package/dist/src/components/icons/svg-icons/FullscreenExitIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/FullscreenExitIcon.tsx +0 -23
- package/dist/src/components/icons/svg-icons/LoadingIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/LoadingIcon.tsx +0 -32
- package/dist/src/components/icons/svg-icons/PauseIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/PauseIcon.tsx +0 -23
- package/dist/src/components/icons/svg-icons/PlayIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/PlayIcon.tsx +0 -21
- package/dist/src/components/icons/svg-icons/PlaybackSpeedIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/PlaybackSpeedIcon.tsx +0 -23
- package/dist/src/components/icons/svg-icons/QualityIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/QualityIcon.tsx +0 -21
- package/dist/src/components/icons/svg-icons/SettingsIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/SettingsIcon.tsx +0 -12
- package/dist/src/components/icons/svg-icons/SliderIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/SliderIcon.tsx +0 -21
- package/dist/src/components/icons/svg-icons/SubtitleIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/SubtitleIcon.tsx +0 -21
- package/dist/src/components/icons/svg-icons/SubtitleOffIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/SubtitleOffIcon.tsx +0 -25
- package/dist/src/components/icons/svg-icons/UnPiPIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/UnPiPIcon.tsx +0 -17
- package/dist/src/components/icons/svg-icons/VolumeMutedIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/VolumeMutedIcon.tsx +0 -16
- package/dist/src/components/icons/svg-icons/VolumeOneIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/VolumeOneIcon.tsx +0 -22
- package/dist/src/components/icons/svg-icons/VolumeThreeIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/VolumeThreeIcon.tsx +0 -16
- package/dist/src/components/icons/svg-icons/VolumeTwoIcon.d.ts +0 -4
- package/dist/src/components/icons/svg-icons/VolumeTwoIcon.tsx +0 -16
- package/dist/src/components/legacy.d.ts +0 -13
- package/dist/src/components/legacy.tsx +0 -93
- package/dist/src/components/media-metadata-display.d.ts +0 -11
- package/dist/src/components/media-metadata-display.tsx +0 -100
- package/dist/src/components/media-player-audio.d.ts +0 -9
- package/dist/src/components/media-player-audio.tsx +0 -39
- package/dist/src/components/media-player-controls.d.ts +0 -23
- package/dist/src/components/media-player-controls.tsx +0 -226
- package/dist/src/components/media-player-error.d.ts +0 -16
- package/dist/src/components/media-player-error.tsx +0 -163
- package/dist/src/components/media-player-fullscreen.d.ts +0 -12
- package/dist/src/components/media-player-fullscreen.tsx +0 -109
- package/dist/src/components/media-player-hls.d.ts +0 -23
- package/dist/src/components/media-player-hls.tsx +0 -111
- package/dist/src/components/media-player-loading.d.ts +0 -12
- package/dist/src/components/media-player-loading.tsx +0 -76
- package/dist/src/components/media-player-play.d.ts +0 -11
- package/dist/src/components/media-player-play.tsx +0 -75
- package/dist/src/components/media-player-root.d.ts +0 -28
- package/dist/src/components/media-player-root.tsx +0 -340
- package/dist/src/components/media-player-seek.d.ts +0 -15
- package/dist/src/components/media-player-seek.tsx +0 -168
- package/dist/src/components/media-player-time.d.ts +0 -12
- package/dist/src/components/media-player-time.tsx +0 -99
- package/dist/src/components/media-player-tooltip.d.ts +0 -13
- package/dist/src/components/media-player-tooltip.tsx +0 -58
- package/dist/src/components/media-player-video.d.ts +0 -9
- package/dist/src/components/media-player-video.tsx +0 -39
- package/dist/src/components/media-player-volume.d.ts +0 -13
- package/dist/src/components/media-player-volume.tsx +0 -155
- package/dist/src/components/media-player.d.ts +0 -3
- package/dist/src/components/media-player.tsx +0 -257
- package/dist/src/components/media-suspense.d.ts +0 -78
- package/dist/src/components/media-suspense.tsx +0 -362
- package/dist/src/components/player-settings-form.d.ts +0 -8
- package/dist/src/components/player-settings-form.tsx +0 -163
- package/dist/src/components/react-player-wrapper.d.ts +0 -64
- package/dist/src/components/react-player-wrapper.tsx +0 -651
- package/dist/src/components/simple-video-player.d.ts +0 -9
- package/dist/src/components/simple-video-player.tsx +0 -60
- package/dist/src/components/ui/button.tsx +0 -49
- package/dist/src/components/ui/dropdown-menu.tsx +0 -137
- package/dist/src/components/ui/enhanced-seek-bar.d.ts +0 -3
- package/dist/src/components/ui/enhanced-seek-bar.tsx +0 -235
- package/dist/src/components/ui/fullscreen-button.d.ts +0 -3
- package/dist/src/components/ui/fullscreen-button.tsx +0 -60
- package/dist/src/components/ui/icons.tsx +0 -174
- package/dist/src/components/ui/media-resource-preloader.d.ts +0 -21
- package/dist/src/components/ui/media-resource-preloader.tsx +0 -393
- package/dist/src/components/ui/play-button.d.ts +0 -3
- package/dist/src/components/ui/play-button.tsx +0 -107
- package/dist/src/components/ui/seek-bar.d.ts +0 -3
- package/dist/src/components/ui/seek-bar.tsx +0 -161
- package/dist/src/components/ui/slider.tsx +0 -55
- package/dist/src/components/ui/time-display.d.ts +0 -3
- package/dist/src/components/ui/time-display.tsx +0 -40
- package/dist/src/components/ui/tooltip.tsx +0 -131
- package/dist/src/components/ui/volume-control.d.ts +0 -3
- package/dist/src/components/ui/volume-control.tsx +0 -143
- package/dist/src/components/unified/base-media-player.d.ts +0 -18
- package/dist/src/components/unified/base-media-player.tsx +0 -246
- package/dist/src/components/unified/media-player.d.ts +0 -37
- package/dist/src/components/unified/media-player.tsx +0 -75
- package/dist/src/components/variants/minimal/AccessibleMinimalPlayer.d.ts +0 -42
- package/dist/src/components/variants/minimal/AccessibleMinimalPlayer.tsx +0 -561
- package/dist/src/components/variants/minimal/EnhancedMinimalMediaPlayer.d.ts +0 -44
- package/dist/src/components/variants/minimal/EnhancedMinimalMediaPlayer.tsx +0 -552
- package/dist/src/components/variants/minimal/MinimalControls.d.ts +0 -19
- package/dist/src/components/variants/minimal/MinimalControls.tsx +0 -142
- package/dist/src/components/variants/minimal/MinimalLoading.d.ts +0 -10
- package/dist/src/components/variants/minimal/MinimalLoading.tsx +0 -32
- package/dist/src/components/variants/minimal/MinimalMediaPlayer.d.ts +0 -38
- package/dist/src/components/variants/minimal/MinimalMediaPlayer.tsx +0 -315
- package/dist/src/components/variants/minimal/MinimalOverlay.d.ts +0 -11
- package/dist/src/components/variants/minimal/MinimalOverlay.tsx +0 -64
- package/dist/src/components/variants/minimal/MinimalPlayButton.d.ts +0 -9
- package/dist/src/components/variants/minimal/MinimalPlayButton.tsx +0 -65
- package/dist/src/components/variants/minimal/MinimalSeekBar.d.ts +0 -7
- package/dist/src/components/variants/minimal/MinimalSeekBar.tsx +0 -150
- package/dist/src/components/variants/minimal/MinimalVolumeControl.d.ts +0 -7
- package/dist/src/components/variants/minimal/MinimalVolumeControl.tsx +0 -80
- package/dist/src/components/variants/minimal/SimpleMinimalPlayer.d.ts +0 -22
- package/dist/src/components/variants/minimal/SimpleMinimalPlayer.tsx +0 -209
- package/dist/src/components/variants/minimal/components/CenterPlayButton.d.ts +0 -7
- package/dist/src/components/variants/minimal/components/CenterPlayButton.tsx +0 -22
- package/dist/src/components/variants/minimal/components/ControlBar.d.ts +0 -43
- package/dist/src/components/variants/minimal/components/ControlBar.tsx +0 -146
- package/dist/src/components/variants/minimal/components/EnhancedSettingsMenu.d.ts +0 -24
- package/dist/src/components/variants/minimal/components/EnhancedSettingsMenu.tsx +0 -361
- package/dist/src/components/variants/minimal/components/PlaybackControls.d.ts +0 -9
- package/dist/src/components/variants/minimal/components/PlaybackControls.tsx +0 -51
- package/dist/src/components/variants/minimal/components/RightControls.d.ts +0 -25
- package/dist/src/components/variants/minimal/components/RightControls.tsx +0 -173
- package/dist/src/components/variants/minimal/components/SeekBar.d.ts +0 -11
- package/dist/src/components/variants/minimal/components/SeekBar.tsx +0 -131
- package/dist/src/components/variants/minimal/components/SettingsDropdown.d.ts +0 -9
- package/dist/src/components/variants/minimal/components/SettingsDropdown.tsx +0 -70
- package/dist/src/components/variants/minimal/components/SubtitleDisplay.d.ts +0 -7
- package/dist/src/components/variants/minimal/components/SubtitleDisplay.tsx +0 -21
- package/dist/src/components/variants/minimal/components/TimeDisplay.d.ts +0 -7
- package/dist/src/components/variants/minimal/components/TimeDisplay.tsx +0 -18
- package/dist/src/components/variants/minimal/components/VideoElement.d.ts +0 -13
- package/dist/src/components/variants/minimal/components/VideoElement.tsx +0 -40
- package/dist/src/components/variants/minimal/components/VolumeControl.d.ts +0 -13
- package/dist/src/components/variants/minimal/components/VolumeControl.tsx +0 -217
- package/dist/src/components/variants/minimal/index.d.ts +0 -17
- package/dist/src/components/variants/minimal/index.ts +0 -23
- package/dist/src/components/video-player.d.ts +0 -3
- package/dist/src/components/video-player.tsx +0 -100
- package/dist/src/context/error-handling.d.ts +0 -72
- package/dist/src/context/error-handling.ts +0 -394
- package/dist/src/context/media-context.d.ts +0 -104
- package/dist/src/context/media-context.tsx +0 -208
- package/dist/src/context/media-provider.d.ts +0 -26
- package/dist/src/context/media-provider.tsx +0 -265
- package/dist/src/context/media-store.d.ts +0 -33
- package/dist/src/context/media-store.ts +0 -379
- package/dist/src/context/persistence.d.ts +0 -83
- package/dist/src/context/persistence.ts +0 -453
- package/dist/src/core/events/event-system.d.ts +0 -170
- package/dist/src/core/events/event-system.ts +0 -442
- package/dist/src/core/events/hooks.d.ts +0 -33
- package/dist/src/core/events/hooks.ts +0 -302
- package/dist/src/core/events/index.d.ts +0 -6
- package/dist/src/core/events/index.ts +0 -22
- package/dist/src/core/events/middleware.d.ts +0 -39
- package/dist/src/core/events/middleware.ts +0 -269
- package/dist/src/core/index.d.ts +0 -8
- package/dist/src/core/index.ts +0 -22
- package/dist/src/core/optimization/bundle-optimizer.d.ts +0 -44
- package/dist/src/core/optimization/bundle-optimizer.tsx +0 -308
- package/dist/src/core/performance/cicd.d.ts +0 -8
- package/dist/src/core/performance/cicd.ts +0 -96
- package/dist/src/core/performance/index.d.ts +0 -10
- package/dist/src/core/performance/index.ts +0 -38
- package/dist/src/core/performance/media-loading-optimizer.d.ts +0 -105
- package/dist/src/core/performance/media-loading-optimizer.ts +0 -538
- package/dist/src/core/performance/performance-budgets.d.ts +0 -68
- package/dist/src/core/performance/performance-budgets.ts +0 -432
- package/dist/src/core/performance/performance-monitor.d.ts +0 -95
- package/dist/src/core/performance/performance-monitor.tsx +0 -476
- package/dist/src/core/performance/performance-testing.d.ts +0 -69
- package/dist/src/core/performance/performance-testing.ts +0 -459
- package/dist/src/core/plugins/base-plugin.d.ts +0 -52
- package/dist/src/core/plugins/base-plugin.ts +0 -224
- package/dist/src/core/plugins/enhanced-plugin-system.d.ts +0 -160
- package/dist/src/core/plugins/enhanced-plugin-system.ts +0 -417
- package/dist/src/core/plugins/examples/analytics-plugin.d.ts +0 -30
- package/dist/src/core/plugins/examples/analytics-plugin.ts +0 -242
- package/dist/src/core/plugins/index.d.ts +0 -8
- package/dist/src/core/plugins/index.ts +0 -39
- package/dist/src/core/plugins/registry.d.ts +0 -31
- package/dist/src/core/plugins/registry.ts +0 -327
- package/dist/src/core/plugins/types.d.ts +0 -101
- package/dist/src/core/plugins/types.ts +0 -159
- package/dist/src/core/plugins/utils.d.ts +0 -38
- package/dist/src/core/plugins/utils.ts +0 -316
- package/dist/src/core/progressive-loading.d.ts +0 -88
- package/dist/src/core/progressive-loading.tsx +0 -322
- package/dist/src/core/providers/enhanced-hls-provider.d.ts +0 -50
- package/dist/src/core/providers/enhanced-hls-provider.ts +0 -308
- package/dist/src/core/providers/service-provider.d.ts +0 -49
- package/dist/src/core/providers/service-provider.tsx +0 -168
- package/dist/src/core/utils.d.ts +0 -25
- package/dist/src/core/utils.tsx +0 -38
- package/dist/src/features/media-session/media-session-manager.d.ts +0 -132
- package/dist/src/features/media-session/media-session-manager.ts +0 -429
- package/dist/src/features/picture-in-picture/pip-manager.d.ts +0 -94
- package/dist/src/features/picture-in-picture/pip-manager.ts +0 -429
- package/dist/src/features/playlist/playlist-manager.d.ts +0 -208
- package/dist/src/features/playlist/playlist-manager.ts +0 -606
- package/dist/src/features/subtitles/subtitle-manager.d.ts +0 -136
- package/dist/src/features/subtitles/subtitle-manager.ts +0 -441
- package/dist/src/features/subtitles/subtitle-parser.d.ts +0 -60
- package/dist/src/features/subtitles/subtitle-parser.ts +0 -280
- package/dist/src/features/thumbnails/thumbnail-generator.d.ts +0 -136
- package/dist/src/features/thumbnails/thumbnail-generator.ts +0 -519
- package/dist/src/hooks/accessibility/index.d.ts +0 -5
- package/dist/src/hooks/accessibility/index.ts +0 -27
- package/dist/src/hooks/accessibility/use-accessibility-preferences.d.ts +0 -14
- package/dist/src/hooks/accessibility/use-accessibility-preferences.ts +0 -188
- package/dist/src/hooks/accessibility/use-focus-management.d.ts +0 -31
- package/dist/src/hooks/accessibility/use-focus-management.ts +0 -176
- package/dist/src/hooks/accessibility/use-keyboard-shortcuts.d.ts +0 -38
- package/dist/src/hooks/accessibility/use-keyboard-shortcuts.ts +0 -144
- package/dist/src/hooks/accessibility/use-screen-reader.d.ts +0 -22
- package/dist/src/hooks/accessibility/use-screen-reader.ts +0 -182
- package/dist/src/hooks/core/index.d.ts +0 -18
- package/dist/src/hooks/core/index.ts +0 -47
- package/dist/src/hooks/legacy.d.ts +0 -18
- package/dist/src/hooks/legacy.ts +0 -27
- package/dist/src/hooks/use-enhanced-media-player.d.ts +0 -88
- package/dist/src/hooks/use-enhanced-media-player.ts +0 -485
- package/dist/src/hooks/use-intelligent-preloading.d.ts +0 -66
- package/dist/src/hooks/use-intelligent-preloading.ts +0 -363
- package/dist/src/hooks/use-keyboard-controls.d.ts +0 -13
- package/dist/src/hooks/use-keyboard-controls.ts +0 -115
- package/dist/src/hooks/use-media-actions.d.ts +0 -62
- package/dist/src/hooks/use-media-actions.ts +0 -175
- package/dist/src/hooks/use-media-metadata.d.ts +0 -11
- package/dist/src/hooks/use-media-metadata.ts +0 -89
- package/dist/src/hooks/use-media-optimistic.d.ts +0 -36
- package/dist/src/hooks/use-media-optimistic.ts +0 -270
- package/dist/src/hooks/use-media-player.d.ts +0 -31
- package/dist/src/hooks/use-media-player.ts +0 -310
- package/dist/src/hooks/use-media-state.d.ts +0 -17
- package/dist/src/hooks/use-media-state.ts +0 -190
- package/dist/src/hooks/use-memory-optimization.d.ts +0 -40
- package/dist/src/hooks/use-memory-optimization.ts +0 -358
- package/dist/src/hooks/use-mobile.ts +0 -125
- package/dist/src/hooks/use-optimistic-controls.d.ts +0 -22
- package/dist/src/hooks/use-optimistic-controls.ts +0 -92
- package/dist/src/hooks/use-optimized-media.d.ts +0 -46
- package/dist/src/hooks/use-optimized-media.ts +0 -263
- package/dist/src/hooks/use-touch-gestures.d.ts +0 -47
- package/dist/src/hooks/use-touch-gestures.ts +0 -417
- package/dist/src/hooks/useEnhancedSubtitles.d.ts +0 -39
- package/dist/src/hooks/useEnhancedSubtitles.ts +0 -258
- package/dist/src/hooks/useKeyboardShortcuts.d.ts +0 -10
- package/dist/src/hooks/useKeyboardShortcuts.ts +0 -74
- package/dist/src/hooks/useMediaControls.d.ts +0 -9
- package/dist/src/hooks/useMediaControls.ts +0 -52
- package/dist/src/hooks/useScreenshot.d.ts +0 -4
- package/dist/src/hooks/useScreenshot.ts +0 -57
- package/dist/src/hooks/useSubtitles.d.ts +0 -8
- package/dist/src/hooks/useSubtitles.ts +0 -91
- package/dist/src/hooks/useVideoPlayer.d.ts +0 -32
- package/dist/src/hooks/useVideoPlayer.ts +0 -232
- package/dist/src/icons/components/FullscreenIcon.d.ts +0 -3
- package/dist/src/icons/components/FullscreenIcon.tsx +0 -37
- package/dist/src/icons/components/SettingsIcon.d.ts +0 -3
- package/dist/src/icons/components/SettingsIcon.tsx +0 -38
- package/dist/src/icons/components/animated/LoadingIcon.d.ts +0 -3
- package/dist/src/icons/components/animated/LoadingIcon.tsx +0 -43
- package/dist/src/icons/components/animated/PlayPauseIcon.d.ts +0 -7
- package/dist/src/icons/components/animated/PlayPauseIcon.tsx +0 -50
- package/dist/src/icons/components/media/PauseIcon.d.ts +0 -3
- package/dist/src/icons/components/media/PauseIcon.tsx +0 -39
- package/dist/src/icons/components/media/PlayIcon.d.ts +0 -3
- package/dist/src/icons/components/media/PlayIcon.tsx +0 -38
- package/dist/src/icons/components/volume/VolumeIcon.d.ts +0 -3
- package/dist/src/icons/components/volume/VolumeIcon.tsx +0 -39
- package/dist/src/icons/components/volume/VolumeOffIcon.d.ts +0 -3
- package/dist/src/icons/components/volume/VolumeOffIcon.tsx +0 -39
- package/dist/src/icons/index.d.ts +0 -28
- package/dist/src/icons/index.ts +0 -56
- package/dist/src/icons/provider.d.ts +0 -13
- package/dist/src/icons/provider.tsx +0 -64
- package/dist/src/icons/types.d.ts +0 -18
- package/dist/src/icons/types.ts +0 -40
- package/dist/src/index-enhanced.d.ts +0 -13
- package/dist/src/index-enhanced.ts +0 -35
- package/dist/src/index-legacy.d.ts +0 -81
- package/dist/src/index-legacy.ts +0 -327
- package/dist/src/index.css +0 -102
- package/dist/src/index.d.ts +0 -38
- package/dist/src/index.minimal.d.ts +0 -2
- package/dist/src/index.minimal.ts +0 -4
- package/dist/src/index.ts +0 -216
- package/dist/src/lib/deprecation.d.ts +0 -7
- package/dist/src/lib/deprecation.ts +0 -51
- package/dist/src/lib/format-time.d.ts +0 -9
- package/dist/src/lib/format-time.ts +0 -37
- package/dist/src/lib/index.d.ts +0 -3
- package/dist/src/lib/index.ts +0 -3
- package/dist/src/lib/utils.d.ts +0 -3
- package/dist/src/lib/utils.ts +0 -6
- package/dist/src/styles/globals.css +0 -462
- package/dist/src/styles/minimal-player.css +0 -589
- package/dist/src/styles/pixel-art.css +0 -46
- package/dist/src/styles/videojs.css +0 -100
- package/dist/src/test/setup.d.ts +0 -2
- package/dist/src/test/setup.ts +0 -79
- package/dist/src/types/events.d.ts +0 -41
- package/dist/src/types/events.ts +0 -47
- package/dist/src/types/formats.d.ts +0 -45
- package/dist/src/types/formats.ts +0 -95
- package/dist/src/types/index.d.ts +0 -128
- package/dist/src/types/index.ts +0 -225
- package/dist/src/types/videojs-plugins.d.ts +0 -14
- package/dist/styles/globals.css +0 -462
- package/dist/styles/minimal-player.css +0 -589
- package/dist/styles/pixel-art.css +0 -46
- package/dist/styles/videojs.css +0 -100
- package/src/adapters/videojs-adapter.d.ts +0 -38
- package/src/adapters/videojs-adapter.d.ts.map +0 -1
- package/src/components/AnimateLoading.d.ts +0 -9
- package/src/components/AnimateLoading.d.ts.map +0 -1
- package/src/components/LoadingState.d.ts +0 -33
- package/src/components/LoadingState.d.ts.map +0 -1
- package/src/components/accessibility/keyboard-help-overlay.d.ts +0 -17
- package/src/components/accessibility/keyboard-help-overlay.d.ts.map +0 -1
- package/src/components/audio-player.d.ts +0 -3
- package/src/components/audio-player.d.ts.map +0 -1
- package/src/components/basic/index.d.ts +0 -26
- package/src/components/basic/index.d.ts.map +0 -1
- package/src/components/enhanced/advanced-features.d.ts +0 -45
- package/src/components/enhanced/advanced-features.d.ts.map +0 -1
- package/src/components/enhanced/debug-panel.d.ts +0 -70
- package/src/components/enhanced/debug-panel.d.ts.map +0 -1
- package/src/components/enhanced/enhanced-controls.d.ts +0 -50
- package/src/components/enhanced/enhanced-controls.d.ts.map +0 -1
- package/src/components/enhanced/enhanced-media-player.d.ts +0 -26
- package/src/components/enhanced/enhanced-media-player.d.ts.map +0 -1
- package/src/components/enhanced/error-handling.d.ts +0 -36
- package/src/components/enhanced/error-handling.d.ts.map +0 -1
- package/src/components/enhanced/index.d.ts +0 -7
- package/src/components/enhanced/index.d.ts.map +0 -1
- package/src/components/enhanced/media-player-enhanced.d.ts +0 -21
- package/src/components/enhanced/media-player-enhanced.d.ts.map +0 -1
- package/src/components/examples/basic-video-player.d.ts +0 -10
- package/src/components/examples/basic-video-player.d.ts.map +0 -1
- package/src/components/examples/custom-controls-example.d.ts +0 -10
- package/src/components/examples/custom-controls-example.d.ts.map +0 -1
- package/src/components/examples/enhanced-controls-example.d.ts +0 -9
- package/src/components/examples/enhanced-controls-example.d.ts.map +0 -1
- package/src/components/examples/enhanced-media-player-example.d.ts +0 -9
- package/src/components/examples/enhanced-media-player-example.d.ts.map +0 -1
- package/src/components/examples/loading-states-demo.d.ts +0 -2
- package/src/components/examples/loading-states-demo.d.ts.map +0 -1
- package/src/components/examples/react-19-demo.d.ts +0 -10
- package/src/components/examples/react-19-demo.d.ts.map +0 -1
- package/src/components/examples/volume-orientation-demo.d.ts +0 -2
- package/src/components/examples/volume-orientation-demo.d.ts.map +0 -1
- package/src/components/icon-demo.d.ts +0 -2
- package/src/components/icon-demo.d.ts.map +0 -1
- package/src/components/icons/index.d.ts +0 -36
- package/src/components/icons/index.d.ts.map +0 -1
- package/src/components/icons/svg-icons/ArrowLeftIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/ArrowLeftIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/ArrowRightIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/ArrowRightIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/AudioIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/AudioIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/BackwardIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/BackwardIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/CameraIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/CameraIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/CheckIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/CheckIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/EnablePiPIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/EnablePiPIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/ForwardIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/ForwardIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/FullscreenEnterIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/FullscreenEnterIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/FullscreenExitIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/FullscreenExitIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/LoadingIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/LoadingIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/PauseIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/PauseIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/PlayIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/PlayIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/PlaybackSpeedIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/PlaybackSpeedIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/QualityIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/QualityIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/SettingsIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/SettingsIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/SliderIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/SliderIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/SubtitleIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/SubtitleIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/SubtitleOffIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/SubtitleOffIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/UnPiPIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/UnPiPIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/VolumeMutedIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/VolumeMutedIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/VolumeOneIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/VolumeOneIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/VolumeThreeIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/VolumeThreeIcon.d.ts.map +0 -1
- package/src/components/icons/svg-icons/VolumeTwoIcon.d.ts +0 -4
- package/src/components/icons/svg-icons/VolumeTwoIcon.d.ts.map +0 -1
- package/src/components/legacy.d.ts +0 -13
- package/src/components/legacy.d.ts.map +0 -1
- package/src/components/media-metadata-display.d.ts +0 -11
- package/src/components/media-metadata-display.d.ts.map +0 -1
- package/src/components/media-player-audio.d.ts +0 -9
- package/src/components/media-player-audio.d.ts.map +0 -1
- package/src/components/media-player-controls.d.ts +0 -23
- package/src/components/media-player-controls.d.ts.map +0 -1
- package/src/components/media-player-error.d.ts +0 -16
- package/src/components/media-player-error.d.ts.map +0 -1
- package/src/components/media-player-fullscreen.d.ts +0 -12
- package/src/components/media-player-fullscreen.d.ts.map +0 -1
- package/src/components/media-player-hls.d.ts +0 -23
- package/src/components/media-player-hls.d.ts.map +0 -1
- package/src/components/media-player-loading.d.ts +0 -12
- package/src/components/media-player-loading.d.ts.map +0 -1
- package/src/components/media-player-play.d.ts +0 -11
- package/src/components/media-player-play.d.ts.map +0 -1
- package/src/components/media-player-root.d.ts +0 -28
- package/src/components/media-player-root.d.ts.map +0 -1
- package/src/components/media-player-seek.d.ts +0 -15
- package/src/components/media-player-seek.d.ts.map +0 -1
- package/src/components/media-player-time.d.ts +0 -12
- package/src/components/media-player-time.d.ts.map +0 -1
- package/src/components/media-player-tooltip.d.ts +0 -13
- package/src/components/media-player-tooltip.d.ts.map +0 -1
- package/src/components/media-player-video.d.ts +0 -9
- package/src/components/media-player-video.d.ts.map +0 -1
- package/src/components/media-player-volume.d.ts +0 -13
- package/src/components/media-player-volume.d.ts.map +0 -1
- package/src/components/media-player.d.ts +0 -3
- package/src/components/media-player.d.ts.map +0 -1
- package/src/components/media-suspense.d.ts +0 -78
- package/src/components/media-suspense.d.ts.map +0 -1
- package/src/components/player-settings-form.d.ts +0 -8
- package/src/components/player-settings-form.d.ts.map +0 -1
- package/src/components/react-player-wrapper.d.ts +0 -64
- package/src/components/react-player-wrapper.d.ts.map +0 -1
- package/src/components/simple-video-player.d.ts +0 -9
- package/src/components/simple-video-player.d.ts.map +0 -1
- package/src/components/ui/button.tsx +0 -49
- package/src/components/ui/dropdown-menu.tsx +0 -137
- package/src/components/ui/enhanced-seek-bar.d.ts +0 -3
- package/src/components/ui/enhanced-seek-bar.d.ts.map +0 -1
- package/src/components/ui/fullscreen-button.d.ts +0 -3
- package/src/components/ui/fullscreen-button.d.ts.map +0 -1
- package/src/components/ui/icons.tsx +0 -174
- package/src/components/ui/media-resource-preloader.d.ts +0 -21
- package/src/components/ui/media-resource-preloader.d.ts.map +0 -1
- package/src/components/ui/play-button.d.ts +0 -3
- package/src/components/ui/play-button.d.ts.map +0 -1
- package/src/components/ui/seek-bar.d.ts +0 -3
- package/src/components/ui/seek-bar.d.ts.map +0 -1
- package/src/components/ui/slider.tsx +0 -55
- package/src/components/ui/time-display.d.ts +0 -3
- package/src/components/ui/time-display.d.ts.map +0 -1
- package/src/components/ui/tooltip.tsx +0 -131
- package/src/components/ui/volume-control.d.ts +0 -3
- package/src/components/ui/volume-control.d.ts.map +0 -1
- package/src/components/unified/base-media-player.d.ts +0 -18
- package/src/components/unified/base-media-player.d.ts.map +0 -1
- package/src/components/unified/media-player.d.ts +0 -37
- package/src/components/unified/media-player.d.ts.map +0 -1
- package/src/components/variants/minimal/AccessibleMinimalPlayer.d.ts +0 -42
- package/src/components/variants/minimal/AccessibleMinimalPlayer.d.ts.map +0 -1
- package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.d.ts +0 -44
- package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.d.ts.map +0 -1
- package/src/components/variants/minimal/MinimalControls.d.ts +0 -19
- package/src/components/variants/minimal/MinimalControls.d.ts.map +0 -1
- package/src/components/variants/minimal/MinimalLoading.d.ts +0 -10
- package/src/components/variants/minimal/MinimalLoading.d.ts.map +0 -1
- package/src/components/variants/minimal/MinimalMediaPlayer.d.ts +0 -38
- package/src/components/variants/minimal/MinimalMediaPlayer.d.ts.map +0 -1
- package/src/components/variants/minimal/MinimalOverlay.d.ts +0 -11
- package/src/components/variants/minimal/MinimalOverlay.d.ts.map +0 -1
- package/src/components/variants/minimal/MinimalPlayButton.d.ts +0 -9
- package/src/components/variants/minimal/MinimalPlayButton.d.ts.map +0 -1
- package/src/components/variants/minimal/MinimalSeekBar.d.ts +0 -7
- package/src/components/variants/minimal/MinimalSeekBar.d.ts.map +0 -1
- package/src/components/variants/minimal/MinimalVolumeControl.d.ts +0 -7
- package/src/components/variants/minimal/MinimalVolumeControl.d.ts.map +0 -1
- package/src/components/variants/minimal/SimpleMinimalPlayer.d.ts +0 -22
- package/src/components/variants/minimal/SimpleMinimalPlayer.d.ts.map +0 -1
- package/src/components/variants/minimal/components/CenterPlayButton.d.ts +0 -7
- package/src/components/variants/minimal/components/CenterPlayButton.d.ts.map +0 -1
- package/src/components/variants/minimal/components/ControlBar.d.ts +0 -43
- package/src/components/variants/minimal/components/ControlBar.d.ts.map +0 -1
- package/src/components/variants/minimal/components/EnhancedSettingsMenu.d.ts +0 -24
- package/src/components/variants/minimal/components/EnhancedSettingsMenu.d.ts.map +0 -1
- package/src/components/variants/minimal/components/PlaybackControls.d.ts +0 -9
- package/src/components/variants/minimal/components/PlaybackControls.d.ts.map +0 -1
- package/src/components/variants/minimal/components/RightControls.d.ts +0 -25
- package/src/components/variants/minimal/components/RightControls.d.ts.map +0 -1
- package/src/components/variants/minimal/components/SeekBar.d.ts +0 -11
- package/src/components/variants/minimal/components/SeekBar.d.ts.map +0 -1
- package/src/components/variants/minimal/components/SettingsDropdown.d.ts +0 -9
- package/src/components/variants/minimal/components/SettingsDropdown.d.ts.map +0 -1
- package/src/components/variants/minimal/components/SubtitleDisplay.d.ts +0 -7
- package/src/components/variants/minimal/components/SubtitleDisplay.d.ts.map +0 -1
- package/src/components/variants/minimal/components/TimeDisplay.d.ts +0 -7
- package/src/components/variants/minimal/components/TimeDisplay.d.ts.map +0 -1
- package/src/components/variants/minimal/components/VideoElement.d.ts +0 -13
- package/src/components/variants/minimal/components/VideoElement.d.ts.map +0 -1
- package/src/components/variants/minimal/components/VolumeControl.d.ts +0 -13
- package/src/components/variants/minimal/components/VolumeControl.d.ts.map +0 -1
- package/src/components/variants/minimal/index.d.ts +0 -17
- package/src/components/variants/minimal/index.d.ts.map +0 -1
- package/src/components/video-player.d.ts +0 -3
- package/src/components/video-player.d.ts.map +0 -1
- package/src/context/error-handling.d.ts +0 -72
- package/src/context/error-handling.d.ts.map +0 -1
- package/src/context/media-context.d.ts +0 -104
- package/src/context/media-context.d.ts.map +0 -1
- package/src/context/media-provider.d.ts +0 -26
- package/src/context/media-provider.d.ts.map +0 -1
- package/src/context/media-store.d.ts +0 -33
- package/src/context/media-store.d.ts.map +0 -1
- package/src/context/persistence.d.ts +0 -83
- package/src/context/persistence.d.ts.map +0 -1
- package/src/core/events/event-system.d.ts +0 -170
- package/src/core/events/event-system.d.ts.map +0 -1
- package/src/core/events/hooks.d.ts +0 -33
- package/src/core/events/hooks.d.ts.map +0 -1
- package/src/core/events/index.d.ts +0 -6
- package/src/core/events/index.d.ts.map +0 -1
- package/src/core/events/middleware.d.ts +0 -39
- package/src/core/events/middleware.d.ts.map +0 -1
- package/src/core/index.d.ts +0 -8
- package/src/core/index.d.ts.map +0 -1
- package/src/core/optimization/bundle-optimizer.d.ts +0 -44
- package/src/core/optimization/bundle-optimizer.d.ts.map +0 -1
- package/src/core/performance/cicd.d.ts +0 -8
- package/src/core/performance/cicd.d.ts.map +0 -1
- package/src/core/performance/index.d.ts +0 -10
- package/src/core/performance/index.d.ts.map +0 -1
- package/src/core/performance/media-loading-optimizer.d.ts +0 -105
- package/src/core/performance/media-loading-optimizer.d.ts.map +0 -1
- package/src/core/performance/performance-budgets.d.ts +0 -68
- package/src/core/performance/performance-budgets.d.ts.map +0 -1
- package/src/core/performance/performance-monitor.d.ts +0 -95
- package/src/core/performance/performance-monitor.d.ts.map +0 -1
- package/src/core/performance/performance-testing.d.ts +0 -69
- package/src/core/performance/performance-testing.d.ts.map +0 -1
- package/src/core/plugins/base-plugin.d.ts +0 -52
- package/src/core/plugins/base-plugin.d.ts.map +0 -1
- package/src/core/plugins/enhanced-plugin-system.d.ts +0 -160
- package/src/core/plugins/enhanced-plugin-system.d.ts.map +0 -1
- package/src/core/plugins/examples/analytics-plugin.d.ts +0 -30
- package/src/core/plugins/examples/analytics-plugin.d.ts.map +0 -1
- package/src/core/plugins/index.d.ts +0 -8
- package/src/core/plugins/index.d.ts.map +0 -1
- package/src/core/plugins/registry.d.ts +0 -31
- package/src/core/plugins/registry.d.ts.map +0 -1
- package/src/core/plugins/types.d.ts +0 -101
- package/src/core/plugins/types.d.ts.map +0 -1
- package/src/core/plugins/utils.d.ts +0 -38
- package/src/core/plugins/utils.d.ts.map +0 -1
- package/src/core/progressive-loading.d.ts +0 -88
- package/src/core/progressive-loading.d.ts.map +0 -1
- package/src/core/providers/enhanced-hls-provider.d.ts +0 -50
- package/src/core/providers/enhanced-hls-provider.d.ts.map +0 -1
- package/src/core/providers/service-provider.d.ts +0 -49
- package/src/core/providers/service-provider.d.ts.map +0 -1
- package/src/core/utils.d.ts +0 -25
- package/src/core/utils.d.ts.map +0 -1
- package/src/features/media-session/media-session-manager.d.ts +0 -132
- package/src/features/media-session/media-session-manager.d.ts.map +0 -1
- package/src/features/picture-in-picture/pip-manager.d.ts +0 -94
- package/src/features/picture-in-picture/pip-manager.d.ts.map +0 -1
- package/src/features/playlist/playlist-manager.d.ts +0 -208
- package/src/features/playlist/playlist-manager.d.ts.map +0 -1
- package/src/features/subtitles/subtitle-manager.d.ts +0 -136
- package/src/features/subtitles/subtitle-manager.d.ts.map +0 -1
- package/src/features/subtitles/subtitle-parser.d.ts +0 -60
- package/src/features/subtitles/subtitle-parser.d.ts.map +0 -1
- package/src/features/thumbnails/thumbnail-generator.d.ts +0 -136
- package/src/features/thumbnails/thumbnail-generator.d.ts.map +0 -1
- package/src/hooks/accessibility/index.d.ts +0 -5
- package/src/hooks/accessibility/index.d.ts.map +0 -1
- package/src/hooks/accessibility/use-accessibility-preferences.d.ts +0 -14
- package/src/hooks/accessibility/use-accessibility-preferences.d.ts.map +0 -1
- package/src/hooks/accessibility/use-focus-management.d.ts +0 -31
- package/src/hooks/accessibility/use-focus-management.d.ts.map +0 -1
- package/src/hooks/accessibility/use-keyboard-shortcuts.d.ts +0 -38
- package/src/hooks/accessibility/use-keyboard-shortcuts.d.ts.map +0 -1
- package/src/hooks/accessibility/use-screen-reader.d.ts +0 -22
- package/src/hooks/accessibility/use-screen-reader.d.ts.map +0 -1
- package/src/hooks/core/index.d.ts +0 -18
- package/src/hooks/core/index.d.ts.map +0 -1
- package/src/hooks/legacy.d.ts +0 -18
- package/src/hooks/legacy.d.ts.map +0 -1
- package/src/hooks/use-enhanced-media-player.d.ts +0 -88
- package/src/hooks/use-enhanced-media-player.d.ts.map +0 -1
- package/src/hooks/use-intelligent-preloading.d.ts +0 -66
- package/src/hooks/use-intelligent-preloading.d.ts.map +0 -1
- package/src/hooks/use-keyboard-controls.d.ts +0 -13
- package/src/hooks/use-keyboard-controls.d.ts.map +0 -1
- package/src/hooks/use-media-actions.d.ts +0 -62
- package/src/hooks/use-media-actions.d.ts.map +0 -1
- package/src/hooks/use-media-metadata.d.ts +0 -11
- package/src/hooks/use-media-metadata.d.ts.map +0 -1
- package/src/hooks/use-media-optimistic.d.ts +0 -36
- package/src/hooks/use-media-optimistic.d.ts.map +0 -1
- package/src/hooks/use-media-player.d.ts +0 -31
- package/src/hooks/use-media-player.d.ts.map +0 -1
- package/src/hooks/use-media-state.d.ts +0 -17
- package/src/hooks/use-media-state.d.ts.map +0 -1
- package/src/hooks/use-memory-optimization.d.ts +0 -40
- package/src/hooks/use-memory-optimization.d.ts.map +0 -1
- package/src/hooks/use-mobile.ts +0 -125
- package/src/hooks/use-optimistic-controls.d.ts +0 -22
- package/src/hooks/use-optimistic-controls.d.ts.map +0 -1
- package/src/hooks/use-optimized-media.d.ts +0 -46
- package/src/hooks/use-optimized-media.d.ts.map +0 -1
- package/src/hooks/use-touch-gestures.d.ts +0 -47
- package/src/hooks/use-touch-gestures.d.ts.map +0 -1
- package/src/hooks/useEnhancedSubtitles.d.ts +0 -39
- package/src/hooks/useEnhancedSubtitles.d.ts.map +0 -1
- package/src/hooks/useKeyboardShortcuts.d.ts +0 -10
- package/src/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/src/hooks/useMediaControls.d.ts +0 -9
- package/src/hooks/useMediaControls.d.ts.map +0 -1
- package/src/hooks/useScreenshot.d.ts +0 -4
- package/src/hooks/useScreenshot.d.ts.map +0 -1
- package/src/hooks/useSubtitles.d.ts +0 -8
- package/src/hooks/useSubtitles.d.ts.map +0 -1
- package/src/hooks/useVideoPlayer.d.ts +0 -32
- package/src/hooks/useVideoPlayer.d.ts.map +0 -1
- package/src/icons/components/FullscreenIcon.d.ts +0 -3
- package/src/icons/components/FullscreenIcon.d.ts.map +0 -1
- package/src/icons/components/SettingsIcon.d.ts +0 -3
- package/src/icons/components/SettingsIcon.d.ts.map +0 -1
- package/src/icons/components/animated/LoadingIcon.d.ts +0 -3
- package/src/icons/components/animated/LoadingIcon.d.ts.map +0 -1
- package/src/icons/components/animated/PlayPauseIcon.d.ts +0 -7
- package/src/icons/components/animated/PlayPauseIcon.d.ts.map +0 -1
- package/src/icons/components/media/PauseIcon.d.ts +0 -3
- package/src/icons/components/media/PauseIcon.d.ts.map +0 -1
- package/src/icons/components/media/PlayIcon.d.ts +0 -3
- package/src/icons/components/media/PlayIcon.d.ts.map +0 -1
- package/src/icons/components/volume/VolumeIcon.d.ts +0 -3
- package/src/icons/components/volume/VolumeIcon.d.ts.map +0 -1
- package/src/icons/components/volume/VolumeOffIcon.d.ts +0 -3
- package/src/icons/components/volume/VolumeOffIcon.d.ts.map +0 -1
- package/src/icons/index.d.ts +0 -28
- package/src/icons/index.d.ts.map +0 -1
- package/src/icons/provider.d.ts +0 -13
- package/src/icons/provider.d.ts.map +0 -1
- package/src/icons/types.d.ts +0 -18
- package/src/icons/types.d.ts.map +0 -1
- package/src/index-enhanced.d.ts +0 -13
- package/src/index-enhanced.d.ts.map +0 -1
- package/src/index-legacy.d.ts +0 -81
- package/src/index-legacy.d.ts.map +0 -1
- package/src/index.d.ts +0 -38
- package/src/index.d.ts.map +0 -1
- package/src/index.minimal.d.ts +0 -2
- package/src/index.minimal.d.ts.map +0 -1
- package/src/index.minimal.ts +0 -4
- package/src/lib/deprecation.d.ts +0 -7
- package/src/lib/deprecation.d.ts.map +0 -1
- package/src/lib/format-time.d.ts +0 -9
- package/src/lib/format-time.d.ts.map +0 -1
- package/src/lib/index.d.ts +0 -3
- package/src/lib/index.d.ts.map +0 -1
- package/src/lib/utils.d.ts +0 -3
- package/src/lib/utils.d.ts.map +0 -1
- package/src/test/setup.d.ts +0 -2
- package/src/test/setup.d.ts.map +0 -1
- package/src/types/events.d.ts +0 -41
- package/src/types/events.d.ts.map +0 -1
- package/src/types/formats.d.ts +0 -45
- package/src/types/formats.d.ts.map +0 -1
- package/src/types/index.d.ts +0 -128
- package/src/types/index.d.ts.map +0 -1
|
@@ -0,0 +1,1142 @@
|
|
|
1
|
+
import { u as K, a as L, b, j as e, M as p } from "./context-BYwDoSRX.js";
|
|
2
|
+
import r, { useMemo as U } from "react";
|
|
3
|
+
import { c as m, f as D } from "./utils-Dzpl2ArK.js";
|
|
4
|
+
function $(...d) {
|
|
5
|
+
return (l) => {
|
|
6
|
+
d.forEach((s) => {
|
|
7
|
+
typeof s == "function" ? s(l) : s && (s.current = l);
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function X(d, l, s, n) {
|
|
12
|
+
const [t, o] = r.useState(!0), [a, i] = r.useState(!1), [c, x] = r.useState(!1), u = r.useRef(null), w = r.useCallback(() => {
|
|
13
|
+
u.current && clearTimeout(u.current), d && (u.current = setTimeout(() => {
|
|
14
|
+
!a && !c && o(!1);
|
|
15
|
+
}, l));
|
|
16
|
+
}, [d, l, a, c]), C = r.useCallback(() => {
|
|
17
|
+
o(!0), w();
|
|
18
|
+
}, [w]);
|
|
19
|
+
r.useEffect(() => (d ? w() : o(!0), () => {
|
|
20
|
+
u.current && clearTimeout(u.current);
|
|
21
|
+
}), [d, w]);
|
|
22
|
+
const g = r.useCallback(() => {
|
|
23
|
+
s && (i(!0), o(!0));
|
|
24
|
+
}, [s]), y = r.useCallback(() => {
|
|
25
|
+
s && (i(!1), w());
|
|
26
|
+
}, [s, w]), h = r.useCallback(() => {
|
|
27
|
+
n && (x(!0), C());
|
|
28
|
+
}, [n, C]), N = r.useCallback(() => {
|
|
29
|
+
n && (x(!1), w());
|
|
30
|
+
}, [n, w]);
|
|
31
|
+
return {
|
|
32
|
+
showControls: t,
|
|
33
|
+
showControlsTemporarily: C,
|
|
34
|
+
handleMouseEnter: g,
|
|
35
|
+
handleMouseLeave: y,
|
|
36
|
+
handleTouchStart: h,
|
|
37
|
+
handleTouchEnd: N
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function G(d) {
|
|
41
|
+
const l = L(), s = b((g) => g.isPlaying), n = b((g) => g.currentTime), t = b((g) => g.duration), o = b((g) => g.volume), [a, i] = r.useState(
|
|
42
|
+
null
|
|
43
|
+
), [c, x] = r.useState(!1), u = r.useCallback(
|
|
44
|
+
(g) => {
|
|
45
|
+
if (!d) return;
|
|
46
|
+
const y = g.touches[0];
|
|
47
|
+
if (!y) return;
|
|
48
|
+
const h = Date.now();
|
|
49
|
+
a && h - a.time < 300 ? (x(!0), l({
|
|
50
|
+
type: s ? p.PAUSE : p.PLAY
|
|
51
|
+
})) : (i({
|
|
52
|
+
x: y.clientX,
|
|
53
|
+
y: y.clientY,
|
|
54
|
+
time: h
|
|
55
|
+
}), x(!1));
|
|
56
|
+
},
|
|
57
|
+
[d, a, s, l]
|
|
58
|
+
), w = r.useCallback(
|
|
59
|
+
(g) => {
|
|
60
|
+
if (!d || !a || c) return;
|
|
61
|
+
const y = g.touches[0];
|
|
62
|
+
if (!y) return;
|
|
63
|
+
const h = y.clientX - a.x, N = y.clientY - a.y;
|
|
64
|
+
if (Math.abs(h) > Math.abs(N) && Math.abs(h) > 50) {
|
|
65
|
+
const E = h / window.innerWidth * 30, T = Math.max(0, Math.min(t, n + E));
|
|
66
|
+
l({
|
|
67
|
+
type: p.SEEK,
|
|
68
|
+
detail: T
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (Math.abs(N) > Math.abs(h) && Math.abs(N) > 50 && a.x > window.innerWidth / 2) {
|
|
72
|
+
const E = -(N / window.innerHeight) * 1, T = Math.max(0, Math.min(1, o + E));
|
|
73
|
+
l({
|
|
74
|
+
type: p.SET_VOLUME,
|
|
75
|
+
detail: T
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
[d, a, c, t, n, o, l]
|
|
80
|
+
), C = r.useCallback(() => {
|
|
81
|
+
d && setTimeout(() => {
|
|
82
|
+
i(null), x(!1);
|
|
83
|
+
}, 300);
|
|
84
|
+
}, [d]);
|
|
85
|
+
return {
|
|
86
|
+
handleTouchStart: u,
|
|
87
|
+
handleTouchMove: w,
|
|
88
|
+
handleTouchEnd: C
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const Y = function({
|
|
92
|
+
children: l,
|
|
93
|
+
className: s,
|
|
94
|
+
autoHide: n = !0,
|
|
95
|
+
autoHideDelay: t = 3e3,
|
|
96
|
+
showControlsOnHover: o = !0,
|
|
97
|
+
showControlsOnTouch: a = !0,
|
|
98
|
+
enableKeyboardControls: i = !0,
|
|
99
|
+
enableTouchGestures: c = !0,
|
|
100
|
+
onPlay: x,
|
|
101
|
+
onPause: u,
|
|
102
|
+
onTimeUpdate: w,
|
|
103
|
+
onVolumeChange: C,
|
|
104
|
+
onFullscreenChange: g
|
|
105
|
+
}) {
|
|
106
|
+
const y = K(), h = L(), N = b(r.useCallback((k) => k.isPlaying, [])), E = b(r.useCallback((k) => k.isFullscreen, [])), T = b(r.useCallback((k) => k.currentTime, [])), S = b(r.useCallback((k) => k.volume, [])), f = b(r.useCallback((k) => k.error, [])), {
|
|
107
|
+
showControls: v,
|
|
108
|
+
showControlsTemporarily: B,
|
|
109
|
+
handleMouseEnter: z,
|
|
110
|
+
handleMouseLeave: A,
|
|
111
|
+
handleTouchStart: j,
|
|
112
|
+
handleTouchEnd: M
|
|
113
|
+
} = X(n, t, o, a), {
|
|
114
|
+
handleTouchStart: F,
|
|
115
|
+
handleTouchMove: V,
|
|
116
|
+
handleTouchEnd: R
|
|
117
|
+
} = G(c), I = r.useCallback(
|
|
118
|
+
(k) => {
|
|
119
|
+
j(), F(k);
|
|
120
|
+
},
|
|
121
|
+
[j, F]
|
|
122
|
+
), H = r.useCallback(() => {
|
|
123
|
+
M(), R();
|
|
124
|
+
}, [M, R]), O = r.useCallback(() => {
|
|
125
|
+
B();
|
|
126
|
+
}, [B]);
|
|
127
|
+
return r.useEffect(() => {
|
|
128
|
+
if (!i) return;
|
|
129
|
+
const k = (P) => {
|
|
130
|
+
if (!(P.target instanceof HTMLInputElement || P.target instanceof HTMLTextAreaElement))
|
|
131
|
+
switch (P.code) {
|
|
132
|
+
case "Space":
|
|
133
|
+
case "KeyK":
|
|
134
|
+
P.preventDefault(), h({
|
|
135
|
+
type: N ? p.PAUSE : p.PLAY
|
|
136
|
+
});
|
|
137
|
+
break;
|
|
138
|
+
case "KeyF":
|
|
139
|
+
P.preventDefault(), h({
|
|
140
|
+
type: E ? p.EXIT_FULLSCREEN : p.ENTER_FULLSCREEN
|
|
141
|
+
});
|
|
142
|
+
break;
|
|
143
|
+
case "KeyM":
|
|
144
|
+
P.preventDefault(), h({ type: p.TOGGLE_MUTE });
|
|
145
|
+
break;
|
|
146
|
+
case "ArrowLeft":
|
|
147
|
+
P.preventDefault(), h({
|
|
148
|
+
type: p.SEEK,
|
|
149
|
+
detail: Math.max(0, T - 10)
|
|
150
|
+
});
|
|
151
|
+
break;
|
|
152
|
+
case "ArrowRight":
|
|
153
|
+
P.preventDefault(), h({
|
|
154
|
+
type: p.SEEK,
|
|
155
|
+
detail: T + 10
|
|
156
|
+
});
|
|
157
|
+
break;
|
|
158
|
+
case "ArrowUp":
|
|
159
|
+
P.preventDefault(), h({
|
|
160
|
+
type: p.SET_VOLUME,
|
|
161
|
+
detail: Math.min(1, S + 0.1)
|
|
162
|
+
});
|
|
163
|
+
break;
|
|
164
|
+
case "ArrowDown":
|
|
165
|
+
P.preventDefault(), h({
|
|
166
|
+
type: p.SET_VOLUME,
|
|
167
|
+
detail: Math.max(0, S - 0.1)
|
|
168
|
+
});
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
173
|
+
}, [i, h, N, E, T, S]), r.useEffect(() => {
|
|
174
|
+
N ? x?.() : u?.();
|
|
175
|
+
}, [N, x, u]), r.useEffect(() => {
|
|
176
|
+
w?.(T);
|
|
177
|
+
}, [T, w]), r.useEffect(() => {
|
|
178
|
+
C?.(S);
|
|
179
|
+
}, [S, C]), r.useEffect(() => {
|
|
180
|
+
g?.(E);
|
|
181
|
+
}, [E, g]), /* @__PURE__ */ e.jsx(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
ref: $(y.rootRef),
|
|
185
|
+
className: m(
|
|
186
|
+
"relative isolate flex flex-col overflow-hidden rounded-lg bg-black outline-none",
|
|
187
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
188
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
189
|
+
E && "fixed inset-0 z-50 rounded-none",
|
|
190
|
+
s
|
|
191
|
+
),
|
|
192
|
+
"data-state": E ? "fullscreen" : "inline",
|
|
193
|
+
"data-disabled": f ? "" : void 0,
|
|
194
|
+
"data-controls-visible": v ? "" : void 0,
|
|
195
|
+
tabIndex: 0,
|
|
196
|
+
onMouseEnter: z,
|
|
197
|
+
onMouseLeave: A,
|
|
198
|
+
onTouchStart: I,
|
|
199
|
+
onTouchMove: V,
|
|
200
|
+
onTouchEnd: H,
|
|
201
|
+
onClick: O,
|
|
202
|
+
children: l
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
};
|
|
206
|
+
Y.displayName = "EnhancedMediaPlayer";
|
|
207
|
+
const W = function({
|
|
208
|
+
qualities: l,
|
|
209
|
+
currentQuality: s,
|
|
210
|
+
onQualityChange: n,
|
|
211
|
+
className: t
|
|
212
|
+
}) {
|
|
213
|
+
const [o, a] = r.useState(!1), i = r.useMemo(() => l.find((c) => c.id === s)?.label || "Auto", [l, s]);
|
|
214
|
+
return /* @__PURE__ */ e.jsxs("div", { className: m("relative", t), children: [
|
|
215
|
+
/* @__PURE__ */ e.jsxs(
|
|
216
|
+
"button",
|
|
217
|
+
{
|
|
218
|
+
type: "button",
|
|
219
|
+
onClick: () => a(!o),
|
|
220
|
+
className: "flex items-center gap-2 rounded-lg bg-black/50 px-3 py-2 text-white transition-colors hover:bg-black/70",
|
|
221
|
+
"aria-label": "Select quality",
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-4 w-4", children: /* @__PURE__ */ e.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) }),
|
|
224
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm", children: i }),
|
|
225
|
+
/* @__PURE__ */ e.jsx(
|
|
226
|
+
"svg",
|
|
227
|
+
{
|
|
228
|
+
viewBox: "0 0 24 24",
|
|
229
|
+
fill: "currentColor",
|
|
230
|
+
className: m("h-4 w-4 transition-transform", o && "rotate-180"),
|
|
231
|
+
children: /* @__PURE__ */ e.jsx("path", { d: "M7 10l5 5 5-5z" })
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 bottom-full mb-2 min-w-32 rounded-lg border border-white/20 bg-black/90 py-2 backdrop-blur-sm", children: l.map((c) => /* @__PURE__ */ e.jsxs(
|
|
238
|
+
"button",
|
|
239
|
+
{
|
|
240
|
+
onClick: () => {
|
|
241
|
+
n(c.id), a(!1);
|
|
242
|
+
},
|
|
243
|
+
className: m(
|
|
244
|
+
"w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10",
|
|
245
|
+
c.id === s && "bg-primary/20 text-primary"
|
|
246
|
+
),
|
|
247
|
+
children: [
|
|
248
|
+
c.label,
|
|
249
|
+
c.bitrate && /* @__PURE__ */ e.jsxs("span", { className: "ml-2 text-white/60 text-xs", children: [
|
|
250
|
+
"(",
|
|
251
|
+
Math.round(c.bitrate / 1e3),
|
|
252
|
+
"k)"
|
|
253
|
+
] })
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
c.id
|
|
257
|
+
)) })
|
|
258
|
+
] });
|
|
259
|
+
}, Q = function({
|
|
260
|
+
subtitles: l,
|
|
261
|
+
currentSubtitle: s,
|
|
262
|
+
onSubtitleChange: n,
|
|
263
|
+
className: t
|
|
264
|
+
}) {
|
|
265
|
+
const [o, a] = r.useState(!1), i = r.useMemo(() => s && l.find((c) => c.id === s)?.label || "Off", [l, s]);
|
|
266
|
+
return /* @__PURE__ */ e.jsxs("div", { className: m("relative", t), children: [
|
|
267
|
+
/* @__PURE__ */ e.jsxs(
|
|
268
|
+
"button",
|
|
269
|
+
{
|
|
270
|
+
type: "button",
|
|
271
|
+
onClick: () => a(!o),
|
|
272
|
+
className: "flex items-center gap-2 rounded-lg bg-black/50 px-3 py-2 text-white transition-colors hover:bg-black/70",
|
|
273
|
+
"aria-label": "Select subtitles",
|
|
274
|
+
children: [
|
|
275
|
+
/* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-4 w-4", children: /* @__PURE__ */ e.jsx("path", { d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z" }) }),
|
|
276
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm", children: i }),
|
|
277
|
+
/* @__PURE__ */ e.jsx(
|
|
278
|
+
"svg",
|
|
279
|
+
{
|
|
280
|
+
viewBox: "0 0 24 24",
|
|
281
|
+
fill: "currentColor",
|
|
282
|
+
className: m("h-4 w-4 transition-transform", o && "rotate-180"),
|
|
283
|
+
children: /* @__PURE__ */ e.jsx("path", { d: "M7 10l5 5 5-5z" })
|
|
284
|
+
}
|
|
285
|
+
)
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
o && /* @__PURE__ */ e.jsxs("div", { className: "absolute right-0 bottom-full mb-2 min-w-32 rounded-lg border border-white/20 bg-black/90 py-2 backdrop-blur-sm", children: [
|
|
290
|
+
/* @__PURE__ */ e.jsx(
|
|
291
|
+
"button",
|
|
292
|
+
{
|
|
293
|
+
onClick: () => {
|
|
294
|
+
n(null), a(!1);
|
|
295
|
+
},
|
|
296
|
+
className: m(
|
|
297
|
+
"w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10",
|
|
298
|
+
!s && "bg-primary/20 text-primary"
|
|
299
|
+
),
|
|
300
|
+
children: "Off"
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
l.map((c) => /* @__PURE__ */ e.jsx(
|
|
304
|
+
"button",
|
|
305
|
+
{
|
|
306
|
+
onClick: () => {
|
|
307
|
+
n(c.id), a(!1);
|
|
308
|
+
},
|
|
309
|
+
className: m(
|
|
310
|
+
"w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10",
|
|
311
|
+
c.id === s && "bg-primary/20 text-primary"
|
|
312
|
+
),
|
|
313
|
+
children: c.label
|
|
314
|
+
},
|
|
315
|
+
c.id
|
|
316
|
+
))
|
|
317
|
+
] })
|
|
318
|
+
] });
|
|
319
|
+
}, J = function({
|
|
320
|
+
className: l
|
|
321
|
+
}) {
|
|
322
|
+
const s = L(), n = b((c) => c.playbackRate), [t, o] = r.useState(!1), a = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2], i = r.useCallback(
|
|
323
|
+
(c) => {
|
|
324
|
+
s({ type: p.SET_PLAYBACK_RATE, detail: c }), o(!1);
|
|
325
|
+
},
|
|
326
|
+
[s]
|
|
327
|
+
);
|
|
328
|
+
return /* @__PURE__ */ e.jsxs("div", { className: m("relative", l), children: [
|
|
329
|
+
/* @__PURE__ */ e.jsxs(
|
|
330
|
+
"button",
|
|
331
|
+
{
|
|
332
|
+
type: "button",
|
|
333
|
+
onClick: () => o(!t),
|
|
334
|
+
className: "flex items-center gap-2 rounded-lg bg-black/50 px-3 py-2 text-white transition-colors hover:bg-black/70",
|
|
335
|
+
"aria-label": "Select playback speed",
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-4 w-4", children: /* @__PURE__ */ e.jsx("path", { d: "M13,8A4,4 0 0,0 9,12A4,4 0 0,0 13,16A4,4 0 0,0 17,12A4,4 0 0,0 13,8M13,14A2,2 0 0,1 11,12A2,2 0 0,1 13,10A2,2 0 0,1 15,12A2,2 0 0,1 13,14M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4Z" }) }),
|
|
338
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm", children: [
|
|
339
|
+
n,
|
|
340
|
+
"x"
|
|
341
|
+
] }),
|
|
342
|
+
/* @__PURE__ */ e.jsx(
|
|
343
|
+
"svg",
|
|
344
|
+
{
|
|
345
|
+
viewBox: "0 0 24 24",
|
|
346
|
+
fill: "currentColor",
|
|
347
|
+
className: m("h-4 w-4 transition-transform", t && "rotate-180"),
|
|
348
|
+
children: /* @__PURE__ */ e.jsx("path", { d: "M7 10l5 5 5-5z" })
|
|
349
|
+
}
|
|
350
|
+
)
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 bottom-full mb-2 min-w-20 rounded-lg border border-white/20 bg-black/90 py-2 backdrop-blur-sm", children: a.map((c) => /* @__PURE__ */ e.jsxs(
|
|
355
|
+
"button",
|
|
356
|
+
{
|
|
357
|
+
onClick: () => i(c),
|
|
358
|
+
className: m(
|
|
359
|
+
"w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10",
|
|
360
|
+
c === n && "bg-primary/20 text-primary"
|
|
361
|
+
),
|
|
362
|
+
children: [
|
|
363
|
+
c,
|
|
364
|
+
"x"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
c
|
|
368
|
+
)) })
|
|
369
|
+
] });
|
|
370
|
+
}, Z = function({
|
|
371
|
+
chapters: l,
|
|
372
|
+
onChapterSelect: s,
|
|
373
|
+
className: n
|
|
374
|
+
}) {
|
|
375
|
+
const t = b((a) => a.currentTime), o = r.useMemo(() => l.find(
|
|
376
|
+
(a) => t >= a.startTime && t < a.endTime
|
|
377
|
+
), [l, t]);
|
|
378
|
+
return /* @__PURE__ */ e.jsxs(
|
|
379
|
+
"div",
|
|
380
|
+
{
|
|
381
|
+
className: m(
|
|
382
|
+
"rounded-lg border border-white/20 bg-black/90 p-4 backdrop-blur-sm",
|
|
383
|
+
n
|
|
384
|
+
),
|
|
385
|
+
children: [
|
|
386
|
+
/* @__PURE__ */ e.jsx("h3", { className: "mb-3 font-semibold text-white", children: "Chapters" }),
|
|
387
|
+
/* @__PURE__ */ e.jsx("div", { className: "max-h-64 space-y-2 overflow-y-auto", children: l.map((a) => /* @__PURE__ */ e.jsxs(
|
|
388
|
+
"button",
|
|
389
|
+
{
|
|
390
|
+
onClick: () => s(a),
|
|
391
|
+
className: m(
|
|
392
|
+
"flex w-full items-center gap-3 rounded-lg p-3 text-left transition-colors",
|
|
393
|
+
"hover:bg-white/10",
|
|
394
|
+
a.id === o?.id && "border border-primary/30 bg-primary/20"
|
|
395
|
+
),
|
|
396
|
+
children: [
|
|
397
|
+
a.thumbnail && /* @__PURE__ */ e.jsx(
|
|
398
|
+
"img",
|
|
399
|
+
{
|
|
400
|
+
src: a.thumbnail,
|
|
401
|
+
alt: a.title,
|
|
402
|
+
className: "h-9 w-16 rounded object-cover"
|
|
403
|
+
}
|
|
404
|
+
),
|
|
405
|
+
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
406
|
+
/* @__PURE__ */ e.jsx("div", { className: "truncate font-medium text-white", children: a.title }),
|
|
407
|
+
/* @__PURE__ */ e.jsxs("div", { className: "text-sm text-white/60", children: [
|
|
408
|
+
D(a.startTime),
|
|
409
|
+
" - ",
|
|
410
|
+
D(a.endTime)
|
|
411
|
+
] })
|
|
412
|
+
] })
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
a.id
|
|
416
|
+
)) })
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
}, q = function({
|
|
421
|
+
className: l
|
|
422
|
+
}) {
|
|
423
|
+
const s = L(), n = b((o) => o.isPictureInPicture), t = r.useCallback(() => {
|
|
424
|
+
s({
|
|
425
|
+
type: n ? p.EXIT_PIP : p.ENTER_PIP
|
|
426
|
+
});
|
|
427
|
+
}, [s, n]);
|
|
428
|
+
return /* @__PURE__ */ e.jsx(
|
|
429
|
+
"button",
|
|
430
|
+
{
|
|
431
|
+
type: "button",
|
|
432
|
+
onClick: t,
|
|
433
|
+
className: m(
|
|
434
|
+
"flex h-10 w-10 items-center justify-center rounded-full text-white",
|
|
435
|
+
"transition-colors hover:bg-white/10",
|
|
436
|
+
l
|
|
437
|
+
),
|
|
438
|
+
"aria-label": n ? "Exit Picture-in-Picture" : "Enter Picture-in-Picture",
|
|
439
|
+
children: /* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-5 w-5", children: /* @__PURE__ */ e.jsx("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" }) })
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
}, ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
443
|
+
__proto__: null,
|
|
444
|
+
ChaptersPanel: Z,
|
|
445
|
+
PictureInPictureButton: q,
|
|
446
|
+
PlaybackSpeedSelector: J,
|
|
447
|
+
QualitySelector: W,
|
|
448
|
+
SubtitleSelector: Q
|
|
449
|
+
}, Symbol.toStringTag, { value: "Module" })), ee = function({
|
|
450
|
+
className: l,
|
|
451
|
+
size: s = "md"
|
|
452
|
+
}) {
|
|
453
|
+
const n = L(), t = b((x) => x.isPlaying), o = b((x) => x.isLoading), a = {
|
|
454
|
+
sm: "h-8 w-8",
|
|
455
|
+
md: "h-10 w-10",
|
|
456
|
+
lg: "h-12 w-12",
|
|
457
|
+
xl: "h-16 w-16"
|
|
458
|
+
}, i = {
|
|
459
|
+
sm: "h-4 w-4",
|
|
460
|
+
md: "h-5 w-5",
|
|
461
|
+
lg: "h-6 w-6",
|
|
462
|
+
xl: "h-8 w-8"
|
|
463
|
+
}, c = r.useCallback(() => {
|
|
464
|
+
n({
|
|
465
|
+
type: t ? p.PAUSE : p.PLAY
|
|
466
|
+
});
|
|
467
|
+
}, [n, t]);
|
|
468
|
+
return /* @__PURE__ */ e.jsx(
|
|
469
|
+
"button",
|
|
470
|
+
{
|
|
471
|
+
type: "button",
|
|
472
|
+
onClick: c,
|
|
473
|
+
disabled: o,
|
|
474
|
+
className: m(
|
|
475
|
+
"group relative flex items-center justify-center rounded-full bg-white/10 backdrop-blur-sm",
|
|
476
|
+
"border border-white/20 text-white transition-all duration-200",
|
|
477
|
+
"hover:scale-105 hover:bg-white/20 active:scale-95",
|
|
478
|
+
"focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
479
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
480
|
+
a[s],
|
|
481
|
+
l
|
|
482
|
+
),
|
|
483
|
+
"aria-label": t ? "Pause" : "Play",
|
|
484
|
+
children: o ? /* @__PURE__ */ e.jsx(
|
|
485
|
+
"div",
|
|
486
|
+
{
|
|
487
|
+
className: m(
|
|
488
|
+
"animate-spin rounded-full border-2 border-white/30 border-t-white",
|
|
489
|
+
i[s]
|
|
490
|
+
)
|
|
491
|
+
}
|
|
492
|
+
) : /* @__PURE__ */ e.jsx("div", { className: m("transition-transform duration-200", i[s]), children: t ? /* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-full w-full", children: /* @__PURE__ */ e.jsx("path", { d: "M6 4h4v16H6V4zm8 0h4v16h-4V4z" }) }) : /* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "ml-0.5 h-full w-full", children: /* @__PURE__ */ e.jsx("path", { d: "M8 5v14l11-7z" }) }) })
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
}, se = function({
|
|
496
|
+
className: l
|
|
497
|
+
}) {
|
|
498
|
+
const s = L(), n = b((f) => f.currentTime), t = b((f) => f.duration), o = b((f) => f.buffered), a = b((f) => f.previewTime), [i, c] = r.useState(!1), [x, u] = r.useState(null), w = r.useRef(null), C = t > 0 ? n / t * 100 : 0, g = t > 0 && a !== null ? a / t * 100 : null, y = r.useMemo(() => {
|
|
499
|
+
if (!o || t === 0) return [];
|
|
500
|
+
const f = [];
|
|
501
|
+
for (let v = 0; v < o.length; v++)
|
|
502
|
+
f.push({
|
|
503
|
+
start: o.start(v) / t * 100,
|
|
504
|
+
end: o.end(v) / t * 100
|
|
505
|
+
});
|
|
506
|
+
return f;
|
|
507
|
+
}, [o, t]), h = r.useCallback(
|
|
508
|
+
(f) => {
|
|
509
|
+
if (!w.current) return 0;
|
|
510
|
+
const v = w.current.getBoundingClientRect();
|
|
511
|
+
return Math.max(0, Math.min(1, (f - v.left) / v.width)) * t;
|
|
512
|
+
},
|
|
513
|
+
[t]
|
|
514
|
+
), N = r.useCallback(
|
|
515
|
+
(f) => {
|
|
516
|
+
if (!i) {
|
|
517
|
+
const v = h(f.clientX);
|
|
518
|
+
u(v), s({ type: p.PREVIEW_TIME, detail: v });
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
[i, h, s]
|
|
522
|
+
), E = r.useCallback(() => {
|
|
523
|
+
i || (u(null), s({ type: p.CLEAR_PREVIEW }));
|
|
524
|
+
}, [i, s]), T = r.useCallback(
|
|
525
|
+
(f) => {
|
|
526
|
+
c(!0);
|
|
527
|
+
const v = h(f.clientX);
|
|
528
|
+
s({ type: p.SEEK, detail: v });
|
|
529
|
+
},
|
|
530
|
+
[h, s]
|
|
531
|
+
), S = r.useCallback(
|
|
532
|
+
(f) => {
|
|
533
|
+
c(!0);
|
|
534
|
+
const v = h(f.touches[0]?.clientX || 0);
|
|
535
|
+
s({ type: p.SEEK, detail: v });
|
|
536
|
+
},
|
|
537
|
+
[h, s]
|
|
538
|
+
);
|
|
539
|
+
return r.useEffect(() => {
|
|
540
|
+
const f = (z) => {
|
|
541
|
+
if (i) {
|
|
542
|
+
const A = h(z.clientX);
|
|
543
|
+
s({ type: p.SEEK, detail: A });
|
|
544
|
+
}
|
|
545
|
+
}, v = () => {
|
|
546
|
+
c(!1), u(null), s({ type: p.CLEAR_PREVIEW });
|
|
547
|
+
}, B = (z) => {
|
|
548
|
+
if (i) {
|
|
549
|
+
const A = h(z.touches[0]?.clientX || 0);
|
|
550
|
+
s({ type: p.SEEK, detail: A });
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
return i && (document.addEventListener("mousemove", f), document.addEventListener("mouseup", v), document.addEventListener("touchmove", B), document.addEventListener("touchend", v)), () => {
|
|
554
|
+
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", v), document.removeEventListener("touchmove", B), document.removeEventListener("touchend", v);
|
|
555
|
+
};
|
|
556
|
+
}, [i, h, s]), /* @__PURE__ */ e.jsxs("div", { className: m("group relative flex items-center", l), children: [
|
|
557
|
+
(x !== null || a !== null) && /* @__PURE__ */ e.jsx(
|
|
558
|
+
"div",
|
|
559
|
+
{
|
|
560
|
+
className: "pointer-events-none absolute bottom-full mb-2 rounded bg-black/80 px-2 py-1 text-white text-xs",
|
|
561
|
+
style: {
|
|
562
|
+
left: `${g || (x || 0) / t * 100}%`,
|
|
563
|
+
transform: "translateX(-50%)"
|
|
564
|
+
},
|
|
565
|
+
children: D(x || a || 0)
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ e.jsxs(
|
|
569
|
+
"div",
|
|
570
|
+
{
|
|
571
|
+
ref: w,
|
|
572
|
+
className: "relative h-2 w-full cursor-pointer rounded-full bg-white/20 transition-all duration-200 group-hover:h-3",
|
|
573
|
+
onMouseMove: N,
|
|
574
|
+
onMouseLeave: E,
|
|
575
|
+
onMouseDown: T,
|
|
576
|
+
onTouchStart: S,
|
|
577
|
+
children: [
|
|
578
|
+
y.map((f, v) => /* @__PURE__ */ e.jsx(
|
|
579
|
+
"div",
|
|
580
|
+
{
|
|
581
|
+
className: "absolute top-0 h-full rounded-full bg-white/30",
|
|
582
|
+
style: {
|
|
583
|
+
left: `${f.start}%`,
|
|
584
|
+
width: `${f.end - f.start}%`
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
v
|
|
588
|
+
)),
|
|
589
|
+
/* @__PURE__ */ e.jsx(
|
|
590
|
+
"div",
|
|
591
|
+
{
|
|
592
|
+
className: "absolute top-0 h-full rounded-full bg-primary transition-all duration-100",
|
|
593
|
+
style: { width: `${C}%` }
|
|
594
|
+
}
|
|
595
|
+
),
|
|
596
|
+
g !== null && /* @__PURE__ */ e.jsx(
|
|
597
|
+
"div",
|
|
598
|
+
{
|
|
599
|
+
className: "absolute top-0 h-full w-1 rounded-full bg-white/80",
|
|
600
|
+
style: { left: `${g}%` }
|
|
601
|
+
}
|
|
602
|
+
),
|
|
603
|
+
/* @__PURE__ */ e.jsx(
|
|
604
|
+
"div",
|
|
605
|
+
{
|
|
606
|
+
className: "-translate-y-1/2 absolute top-1/2 h-4 w-4 rounded-full border-2 border-white bg-primary opacity-0 shadow-lg transition-all duration-200 group-hover:opacity-100",
|
|
607
|
+
style: { left: `${C}%`, transform: "translateX(-50%) translateY(-50%)" }
|
|
608
|
+
}
|
|
609
|
+
)
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
)
|
|
613
|
+
] });
|
|
614
|
+
}, te = function({
|
|
615
|
+
className: l
|
|
616
|
+
}) {
|
|
617
|
+
const s = L(), n = b((u) => u.volume), t = b((u) => u.isMuted), [o, a] = r.useState(!1), i = r.useCallback(() => {
|
|
618
|
+
s({ type: p.TOGGLE_MUTE });
|
|
619
|
+
}, [s]), c = r.useCallback(
|
|
620
|
+
(u) => {
|
|
621
|
+
s({ type: p.SET_VOLUME, detail: u });
|
|
622
|
+
},
|
|
623
|
+
[s]
|
|
624
|
+
), x = r.useMemo(() => t || n === 0 ? /* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-5 w-5", children: /* @__PURE__ */ e.jsx("path", { d: "M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z" }) }) : n < 0.5 ? /* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-5 w-5", children: /* @__PURE__ */ e.jsx("path", { d: "M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z" }) }) : /* @__PURE__ */ e.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-5 w-5", children: /* @__PURE__ */ e.jsx("path", { d: "M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z" }) }), [t, n]);
|
|
625
|
+
return /* @__PURE__ */ e.jsxs(
|
|
626
|
+
"div",
|
|
627
|
+
{
|
|
628
|
+
className: m("relative flex items-center", l),
|
|
629
|
+
onMouseEnter: () => a(!0),
|
|
630
|
+
onMouseLeave: () => a(!1),
|
|
631
|
+
children: [
|
|
632
|
+
/* @__PURE__ */ e.jsx(
|
|
633
|
+
"button",
|
|
634
|
+
{
|
|
635
|
+
type: "button",
|
|
636
|
+
onClick: i,
|
|
637
|
+
className: "flex h-10 w-10 items-center justify-center rounded-full text-white transition-colors hover:bg-white/10",
|
|
638
|
+
"aria-label": t ? "Unmute" : "Mute",
|
|
639
|
+
children: x
|
|
640
|
+
}
|
|
641
|
+
),
|
|
642
|
+
/* @__PURE__ */ e.jsx(
|
|
643
|
+
"div",
|
|
644
|
+
{
|
|
645
|
+
className: m(
|
|
646
|
+
"absolute left-full ml-2 flex items-center transition-all duration-200",
|
|
647
|
+
o ? "translate-x-0 opacity-100" : "-translate-x-2 pointer-events-none opacity-0"
|
|
648
|
+
),
|
|
649
|
+
children: /* @__PURE__ */ e.jsx(
|
|
650
|
+
"input",
|
|
651
|
+
{
|
|
652
|
+
type: "range",
|
|
653
|
+
min: "0",
|
|
654
|
+
max: "1",
|
|
655
|
+
step: "0.01",
|
|
656
|
+
value: t ? 0 : n,
|
|
657
|
+
onChange: (u) => c(parseFloat(u.target.value)),
|
|
658
|
+
className: "slider h-1 w-20 cursor-pointer appearance-none rounded-lg bg-white/20"
|
|
659
|
+
}
|
|
660
|
+
)
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
);
|
|
666
|
+
}, ne = function({
|
|
667
|
+
className: l,
|
|
668
|
+
size: s = "md",
|
|
669
|
+
skipTime: n = 10
|
|
670
|
+
}) {
|
|
671
|
+
const t = L(), o = b((x) => x.currentTime), a = {
|
|
672
|
+
sm: "h-8 w-8",
|
|
673
|
+
md: "h-10 w-10",
|
|
674
|
+
lg: "h-12 w-12"
|
|
675
|
+
}, i = {
|
|
676
|
+
sm: "h-4 w-4",
|
|
677
|
+
md: "h-5 w-5",
|
|
678
|
+
lg: "h-6 w-6"
|
|
679
|
+
}, c = r.useCallback(() => {
|
|
680
|
+
const x = Math.max(0, o - n);
|
|
681
|
+
t({ type: p.SEEK, detail: x });
|
|
682
|
+
}, [t, o, n]);
|
|
683
|
+
return /* @__PURE__ */ e.jsx(
|
|
684
|
+
"button",
|
|
685
|
+
{
|
|
686
|
+
type: "button",
|
|
687
|
+
onClick: c,
|
|
688
|
+
className: m(
|
|
689
|
+
"group relative flex items-center justify-center rounded-full bg-white/10 backdrop-blur-sm",
|
|
690
|
+
"border border-white/20 text-white transition-all duration-200",
|
|
691
|
+
"hover:scale-105 hover:bg-white/20 active:scale-95",
|
|
692
|
+
"focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
693
|
+
a[s],
|
|
694
|
+
l
|
|
695
|
+
),
|
|
696
|
+
"aria-label": `Backward ${n} seconds`,
|
|
697
|
+
title: `Backward ${n}s`,
|
|
698
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center transition-transform duration-200", i[s]), children: [
|
|
699
|
+
/* @__PURE__ */ e.jsxs("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-full w-full", children: [
|
|
700
|
+
/* @__PURE__ */ e.jsx("path", { d: "M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zM15.5 7.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v9c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-9z" }),
|
|
701
|
+
/* @__PURE__ */ e.jsx("path", { d: "M5.5 12l7-4.5v9l-7-4.5z", opacity: "0.8" })
|
|
702
|
+
] }),
|
|
703
|
+
n && /* @__PURE__ */ e.jsx("span", { className: "-bottom-1 absolute font-bold text-[10px]", children: n })
|
|
704
|
+
] })
|
|
705
|
+
}
|
|
706
|
+
);
|
|
707
|
+
}, ae = function({
|
|
708
|
+
className: l,
|
|
709
|
+
size: s = "md",
|
|
710
|
+
skipTime: n = 10
|
|
711
|
+
}) {
|
|
712
|
+
const t = L(), o = b((u) => u.currentTime), a = b((u) => u.duration), i = {
|
|
713
|
+
sm: "h-8 w-8",
|
|
714
|
+
md: "h-10 w-10",
|
|
715
|
+
lg: "h-12 w-12"
|
|
716
|
+
}, c = {
|
|
717
|
+
sm: "h-4 w-4",
|
|
718
|
+
md: "h-5 w-5",
|
|
719
|
+
lg: "h-6 w-6"
|
|
720
|
+
}, x = r.useCallback(() => {
|
|
721
|
+
const u = Math.min(a, o + n);
|
|
722
|
+
t({ type: p.SEEK, detail: u });
|
|
723
|
+
}, [t, o, a, n]);
|
|
724
|
+
return /* @__PURE__ */ e.jsx(
|
|
725
|
+
"button",
|
|
726
|
+
{
|
|
727
|
+
type: "button",
|
|
728
|
+
onClick: x,
|
|
729
|
+
className: m(
|
|
730
|
+
"group relative flex items-center justify-center rounded-full bg-white/10 backdrop-blur-sm",
|
|
731
|
+
"border border-white/20 text-white transition-all duration-200",
|
|
732
|
+
"hover:scale-105 hover:bg-white/20 active:scale-95",
|
|
733
|
+
"focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
734
|
+
i[s],
|
|
735
|
+
l
|
|
736
|
+
),
|
|
737
|
+
"aria-label": `Forward ${n} seconds`,
|
|
738
|
+
title: `Forward ${n}s`,
|
|
739
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center transition-transform duration-200", c[s]), children: [
|
|
740
|
+
/* @__PURE__ */ e.jsxs("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-full w-full", children: [
|
|
741
|
+
/* @__PURE__ */ e.jsx("path", { d: "M17 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zM8.5 7.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v9c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5v-9z" }),
|
|
742
|
+
/* @__PURE__ */ e.jsx("path", { d: "M18.5 12l-7-4.5v9l7-4.5z", opacity: "0.8" })
|
|
743
|
+
] }),
|
|
744
|
+
n && /* @__PURE__ */ e.jsx("span", { className: "-bottom-1 absolute font-bold text-[10px]", children: n })
|
|
745
|
+
] })
|
|
746
|
+
}
|
|
747
|
+
);
|
|
748
|
+
}, _ = function({
|
|
749
|
+
variant: l = "current",
|
|
750
|
+
className: s
|
|
751
|
+
}) {
|
|
752
|
+
const n = b((a) => a.currentTime), t = b((a) => a.duration), o = r.useMemo(() => {
|
|
753
|
+
switch (l) {
|
|
754
|
+
case "current":
|
|
755
|
+
return D(n);
|
|
756
|
+
case "duration":
|
|
757
|
+
return D(t);
|
|
758
|
+
case "remaining":
|
|
759
|
+
return `-${D(t - n)}`;
|
|
760
|
+
default:
|
|
761
|
+
return D(n);
|
|
762
|
+
}
|
|
763
|
+
}, [l, n, t]);
|
|
764
|
+
return /* @__PURE__ */ e.jsx("div", { className: m("font-mono text-sm text-white tabular-nums", s), children: o });
|
|
765
|
+
}, le = function({
|
|
766
|
+
metrics: l,
|
|
767
|
+
className: s
|
|
768
|
+
}) {
|
|
769
|
+
if (!l || process.env.NODE_ENV !== "development")
|
|
770
|
+
return null;
|
|
771
|
+
const n = (o) => o >= 50 ? "text-green-400" : o >= 30 ? "text-yellow-400" : "text-red-400", t = (o) => o >= 5 ? "text-green-400" : o >= 2 ? "text-yellow-400" : "text-red-400";
|
|
772
|
+
return /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center gap-3 font-mono text-xs", s), children: [
|
|
773
|
+
l.fps !== void 0 && /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center gap-1", n(l.fps)), children: [
|
|
774
|
+
/* @__PURE__ */ e.jsx("div", { className: "h-2 w-2 rounded-full bg-current" }),
|
|
775
|
+
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
776
|
+
l.fps,
|
|
777
|
+
" FPS"
|
|
778
|
+
] })
|
|
779
|
+
] }),
|
|
780
|
+
l.bufferHealth !== void 0 && /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center gap-1", t(l.bufferHealth)), children: [
|
|
781
|
+
/* @__PURE__ */ e.jsx("div", { className: "h-2 w-2 rounded-full bg-current" }),
|
|
782
|
+
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
783
|
+
l.bufferHealth.toFixed(1),
|
|
784
|
+
"s"
|
|
785
|
+
] })
|
|
786
|
+
] }),
|
|
787
|
+
l.quality !== void 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 text-blue-400", children: [
|
|
788
|
+
/* @__PURE__ */ e.jsx("div", { className: "h-2 w-2 rounded-full bg-current" }),
|
|
789
|
+
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
790
|
+
l.quality,
|
|
791
|
+
"p"
|
|
792
|
+
] })
|
|
793
|
+
] })
|
|
794
|
+
] });
|
|
795
|
+
}, de = function({
|
|
796
|
+
className: l,
|
|
797
|
+
showSkipButtons: s = !0,
|
|
798
|
+
showVolumeControl: n = !0,
|
|
799
|
+
showTimeDisplay: t = !0,
|
|
800
|
+
playButtonSize: o = "xl",
|
|
801
|
+
skipButtonSize: a = "md",
|
|
802
|
+
skipTime: i = 10,
|
|
803
|
+
showPerformanceIndicators: c = process.env.NODE_ENV === "development",
|
|
804
|
+
performanceMetrics: x
|
|
805
|
+
}) {
|
|
806
|
+
return /* @__PURE__ */ e.jsxs(
|
|
807
|
+
"div",
|
|
808
|
+
{
|
|
809
|
+
className: m(
|
|
810
|
+
"flex flex-col gap-4 bg-gradient-to-t from-black/80 to-transparent p-4",
|
|
811
|
+
l
|
|
812
|
+
),
|
|
813
|
+
children: [
|
|
814
|
+
/* @__PURE__ */ e.jsx(se, { className: "w-full" }),
|
|
815
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
816
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
817
|
+
s && /* @__PURE__ */ e.jsx(
|
|
818
|
+
ne,
|
|
819
|
+
{
|
|
820
|
+
size: a,
|
|
821
|
+
skipTime: i,
|
|
822
|
+
className: "shrink-0"
|
|
823
|
+
}
|
|
824
|
+
),
|
|
825
|
+
/* @__PURE__ */ e.jsx(ee, { size: o, className: "shrink-0" }),
|
|
826
|
+
s && /* @__PURE__ */ e.jsx(ae, { size: a, skipTime: i, className: "shrink-0" }),
|
|
827
|
+
n && /* @__PURE__ */ e.jsx(te, { className: "shrink-0" }),
|
|
828
|
+
t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 font-mono text-sm", children: [
|
|
829
|
+
/* @__PURE__ */ e.jsx(_, { variant: "current" }),
|
|
830
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-white/60", children: "/" }),
|
|
831
|
+
/* @__PURE__ */ e.jsx(_, { variant: "duration" })
|
|
832
|
+
] })
|
|
833
|
+
] }),
|
|
834
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: c && /* @__PURE__ */ e.jsx(le, { metrics: x, className: "text-white/80" }) })
|
|
835
|
+
] })
|
|
836
|
+
]
|
|
837
|
+
}
|
|
838
|
+
);
|
|
839
|
+
}, ue = ({
|
|
840
|
+
performanceMetrics: d = {},
|
|
841
|
+
preloadingStats: l = {},
|
|
842
|
+
playbackState: s = {},
|
|
843
|
+
hlsMetrics: n = {},
|
|
844
|
+
pluginInfo: t = {},
|
|
845
|
+
debugInfo: o = {},
|
|
846
|
+
className: a,
|
|
847
|
+
position: i = "top-right",
|
|
848
|
+
defaultCollapsed: c = !1,
|
|
849
|
+
title: x = "BaroiPlayer Debug Panel"
|
|
850
|
+
}) => {
|
|
851
|
+
const [u, w] = r.useState(c), [C, g] = r.useState(
|
|
852
|
+
"performance"
|
|
853
|
+
), y = U(() => {
|
|
854
|
+
switch (i) {
|
|
855
|
+
case "top-left":
|
|
856
|
+
return "top-4 left-4";
|
|
857
|
+
case "top-right":
|
|
858
|
+
return "top-4 right-4";
|
|
859
|
+
case "bottom-left":
|
|
860
|
+
return "bottom-4 left-4";
|
|
861
|
+
case "bottom-right":
|
|
862
|
+
return "bottom-4 right-4";
|
|
863
|
+
default:
|
|
864
|
+
return "top-4 right-4";
|
|
865
|
+
}
|
|
866
|
+
}, [i]), h = (j) => {
|
|
867
|
+
if (j === 0) return "0 B";
|
|
868
|
+
const M = 1024, F = ["B", "KB", "MB", "GB"], V = Math.floor(Math.log(j) / Math.log(M));
|
|
869
|
+
return parseFloat((j / Math.pow(M, V)).toFixed(2)) + " " + F[V];
|
|
870
|
+
}, N = (j) => {
|
|
871
|
+
const M = Math.floor(j / 60), F = Math.floor(j % 60);
|
|
872
|
+
return `${M}:${F.toString().padStart(2, "0")}`;
|
|
873
|
+
}, E = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
874
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
875
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-green-400", children: "FPS:" }),
|
|
876
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2 font-mono", children: d.fps || 0 })
|
|
877
|
+
] }),
|
|
878
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
879
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-blue-400", children: "Memory:" }),
|
|
880
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
881
|
+
((d.memoryUsage || 0) / 1024 / 1024).toFixed(1),
|
|
882
|
+
" MB"
|
|
883
|
+
] })
|
|
884
|
+
] }),
|
|
885
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
886
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-yellow-400", children: "Buffer:" }),
|
|
887
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
888
|
+
(d.bufferHealth || 0).toFixed(2),
|
|
889
|
+
"s"
|
|
890
|
+
] })
|
|
891
|
+
] }),
|
|
892
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
893
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-purple-400", children: "Bandwidth:" }),
|
|
894
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
895
|
+
h(d.networkBandwidth || 0),
|
|
896
|
+
"/s"
|
|
897
|
+
] })
|
|
898
|
+
] }),
|
|
899
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
900
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-red-400", children: "Dropped:" }),
|
|
901
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
902
|
+
d.droppedFrames || 0,
|
|
903
|
+
" frames"
|
|
904
|
+
] })
|
|
905
|
+
] }),
|
|
906
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
907
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-cyan-400", children: "Decoded:" }),
|
|
908
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
909
|
+
d.decodedFrames || 0,
|
|
910
|
+
" frames"
|
|
911
|
+
] })
|
|
912
|
+
] })
|
|
913
|
+
] }) }), T = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
914
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
915
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-green-400", children: "Status:" }),
|
|
916
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2 font-mono", children: s.isPlaying ? /* @__PURE__ */ e.jsx("span", { className: "text-green-300", children: "Playing" }) : /* @__PURE__ */ e.jsx("span", { className: "text-red-300", children: "Paused" }) })
|
|
917
|
+
] }),
|
|
918
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
919
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-blue-400", children: "Time:" }),
|
|
920
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
921
|
+
N(s.currentTime || 0),
|
|
922
|
+
" / ",
|
|
923
|
+
N(s.duration || 0)
|
|
924
|
+
] })
|
|
925
|
+
] }),
|
|
926
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
927
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-yellow-400", children: "Volume:" }),
|
|
928
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
929
|
+
Math.round((s.volume || 0) * 100),
|
|
930
|
+
"%"
|
|
931
|
+
] })
|
|
932
|
+
] }),
|
|
933
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
934
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-purple-400", children: "Quality:" }),
|
|
935
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
936
|
+
s.quality || 0,
|
|
937
|
+
"p"
|
|
938
|
+
] })
|
|
939
|
+
] }),
|
|
940
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
941
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-red-400", children: "Buffering:" }),
|
|
942
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2 font-mono", children: s.isBuffering ? /* @__PURE__ */ e.jsx("span", { className: "text-yellow-300", children: "Yes" }) : /* @__PURE__ */ e.jsx("span", { className: "text-green-300", children: "No" }) })
|
|
943
|
+
] }),
|
|
944
|
+
s.error && /* @__PURE__ */ e.jsxs("div", { className: "col-span-2", children: [
|
|
945
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-red-400", children: "Error:" }),
|
|
946
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2 break-all font-mono text-red-300 text-xs", children: s.error })
|
|
947
|
+
] })
|
|
948
|
+
] }) }), S = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
949
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
950
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-green-400", children: "Preloaded:" }),
|
|
951
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
952
|
+
l.preloadedItems || 0,
|
|
953
|
+
" items"
|
|
954
|
+
] })
|
|
955
|
+
] }),
|
|
956
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
957
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-blue-400", children: "Engagement:" }),
|
|
958
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
959
|
+
(l.engagementScore || 0).toFixed(1),
|
|
960
|
+
"%"
|
|
961
|
+
] })
|
|
962
|
+
] }),
|
|
963
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
964
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-yellow-400", children: "Queue:" }),
|
|
965
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
966
|
+
l.queueLength || 0,
|
|
967
|
+
" items"
|
|
968
|
+
] })
|
|
969
|
+
] }),
|
|
970
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
971
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-purple-400", children: "Hit Rate:" }),
|
|
972
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
973
|
+
(l.hitRate || 0).toFixed(1),
|
|
974
|
+
"%"
|
|
975
|
+
] })
|
|
976
|
+
] }),
|
|
977
|
+
/* @__PURE__ */ e.jsxs("div", { className: "col-span-2", children: [
|
|
978
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-cyan-400", children: "Saved:" }),
|
|
979
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2 font-mono", children: h(l.totalSaved || 0) })
|
|
980
|
+
] })
|
|
981
|
+
] }) }), f = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
982
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
983
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-green-400", children: "Level:" }),
|
|
984
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
985
|
+
n.currentLevel || 0,
|
|
986
|
+
" / ",
|
|
987
|
+
n.availableLevels || 0
|
|
988
|
+
] })
|
|
989
|
+
] }),
|
|
990
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
991
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-blue-400", children: "Bandwidth:" }),
|
|
992
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
993
|
+
h(n.bandwidthEstimate || 0),
|
|
994
|
+
"/s"
|
|
995
|
+
] })
|
|
996
|
+
] }),
|
|
997
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
998
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-red-400", children: "Dropped:" }),
|
|
999
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
1000
|
+
n.droppedFrames || 0,
|
|
1001
|
+
" frames"
|
|
1002
|
+
] })
|
|
1003
|
+
] })
|
|
1004
|
+
] }) }), v = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsxs("div", { className: "text-xs", children: [
|
|
1005
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1006
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-green-400", children: "Total:" }),
|
|
1007
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-2 font-mono", children: [
|
|
1008
|
+
t.pluginCount || 0,
|
|
1009
|
+
" plugins"
|
|
1010
|
+
] })
|
|
1011
|
+
] }),
|
|
1012
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mt-2", children: [
|
|
1013
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-blue-400", children: "Active:" }),
|
|
1014
|
+
/* @__PURE__ */ e.jsx("div", { className: "ml-2 space-y-1 font-mono text-xs", children: t.activePlugins?.map((j, M) => /* @__PURE__ */ e.jsxs("div", { className: "text-green-300", children: [
|
|
1015
|
+
"• ",
|
|
1016
|
+
j
|
|
1017
|
+
] }, M)) || /* @__PURE__ */ e.jsx("div", { className: "text-gray-400", children: "None" }) })
|
|
1018
|
+
] }),
|
|
1019
|
+
t.loadedPlugins && t.loadedPlugins.length > t.activePlugins?.length && /* @__PURE__ */ e.jsxs("div", { className: "mt-2", children: [
|
|
1020
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-yellow-400", children: "Loaded (inactive):" }),
|
|
1021
|
+
/* @__PURE__ */ e.jsx("div", { className: "ml-2 space-y-1 font-mono text-xs", children: t.loadedPlugins.filter((j) => !t.activePlugins?.includes(j)).map((j, M) => /* @__PURE__ */ e.jsxs("div", { className: "text-yellow-300", children: [
|
|
1022
|
+
"• ",
|
|
1023
|
+
j
|
|
1024
|
+
] }, M)) })
|
|
1025
|
+
] })
|
|
1026
|
+
] }) }), B = () => /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-1 font-mono text-xs", children: Object.entries(o).map(([j, M]) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1027
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-yellow-400", children: [
|
|
1028
|
+
j,
|
|
1029
|
+
":"
|
|
1030
|
+
] }),
|
|
1031
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2 text-gray-300", children: typeof M == "object" ? JSON.stringify(M, null, 2) : String(M) })
|
|
1032
|
+
] }, j)) }) }), z = () => /* @__PURE__ */ e.jsx("div", { className: "flex space-x-1 border-gray-600 border-b", children: [
|
|
1033
|
+
{ id: "performance", label: "Performance" },
|
|
1034
|
+
{ id: "hls", label: "HLS" },
|
|
1035
|
+
{ id: "plugins", label: "Plugins" },
|
|
1036
|
+
{ id: "debug", label: "Debug" }
|
|
1037
|
+
].map((j) => /* @__PURE__ */ e.jsx(
|
|
1038
|
+
"button",
|
|
1039
|
+
{
|
|
1040
|
+
onClick: () => g(j.id),
|
|
1041
|
+
className: m(
|
|
1042
|
+
"px-2 py-1 font-medium text-xs transition-colors",
|
|
1043
|
+
C === j.id ? "border-blue-400 border-b text-blue-400" : "text-gray-400 hover:text-white"
|
|
1044
|
+
),
|
|
1045
|
+
children: j.label
|
|
1046
|
+
},
|
|
1047
|
+
j.id
|
|
1048
|
+
)) }), A = () => {
|
|
1049
|
+
switch (C) {
|
|
1050
|
+
case "performance":
|
|
1051
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
1052
|
+
E(),
|
|
1053
|
+
/* @__PURE__ */ e.jsx("hr", { className: "border-gray-600" }),
|
|
1054
|
+
T(),
|
|
1055
|
+
/* @__PURE__ */ e.jsx("hr", { className: "border-gray-600" }),
|
|
1056
|
+
S()
|
|
1057
|
+
] });
|
|
1058
|
+
case "hls":
|
|
1059
|
+
return f();
|
|
1060
|
+
case "plugins":
|
|
1061
|
+
return v();
|
|
1062
|
+
case "debug":
|
|
1063
|
+
return B();
|
|
1064
|
+
default:
|
|
1065
|
+
return E();
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
return process.env.NODE_ENV !== "development" ? null : /* @__PURE__ */ e.jsxs(
|
|
1069
|
+
"div",
|
|
1070
|
+
{
|
|
1071
|
+
className: m(
|
|
1072
|
+
"fixed z-50 min-w-80 max-w-96 rounded-lg border border-gray-700 bg-black/90 p-3 font-mono text-white text-xs backdrop-blur-sm",
|
|
1073
|
+
y,
|
|
1074
|
+
a
|
|
1075
|
+
),
|
|
1076
|
+
children: [
|
|
1077
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
1078
|
+
/* @__PURE__ */ e.jsx("h3", { className: "font-bold text-blue-400 text-sm", children: x }),
|
|
1079
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e.jsx(
|
|
1080
|
+
"button",
|
|
1081
|
+
{
|
|
1082
|
+
onClick: () => w(!u),
|
|
1083
|
+
className: "text-gray-400 transition-colors hover:text-white",
|
|
1084
|
+
"aria-label": u ? "Expand" : "Collapse",
|
|
1085
|
+
children: u ? /* @__PURE__ */ e.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx(
|
|
1086
|
+
"path",
|
|
1087
|
+
{
|
|
1088
|
+
d: "M3 4.5L6 7.5L9 4.5",
|
|
1089
|
+
stroke: "currentColor",
|
|
1090
|
+
strokeWidth: "1.5",
|
|
1091
|
+
strokeLinecap: "round",
|
|
1092
|
+
strokeLinejoin: "round"
|
|
1093
|
+
}
|
|
1094
|
+
) }) : /* @__PURE__ */ e.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx(
|
|
1095
|
+
"path",
|
|
1096
|
+
{
|
|
1097
|
+
d: "M3 7.5L6 4.5L9 7.5",
|
|
1098
|
+
stroke: "currentColor",
|
|
1099
|
+
strokeWidth: "1.5",
|
|
1100
|
+
strokeLinecap: "round",
|
|
1101
|
+
strokeLinejoin: "round"
|
|
1102
|
+
}
|
|
1103
|
+
) })
|
|
1104
|
+
}
|
|
1105
|
+
) })
|
|
1106
|
+
] }),
|
|
1107
|
+
u ? /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
1108
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1109
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-green-400", children: "FPS:" }),
|
|
1110
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-1 font-mono", children: d.fps || 0 })
|
|
1111
|
+
] }),
|
|
1112
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1113
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-blue-400", children: "Memory:" }),
|
|
1114
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ml-1 font-mono", children: [
|
|
1115
|
+
((d.memoryUsage || 0) / 1024 / 1024).toFixed(1),
|
|
1116
|
+
"MB"
|
|
1117
|
+
] })
|
|
1118
|
+
] })
|
|
1119
|
+
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1120
|
+
z(),
|
|
1121
|
+
/* @__PURE__ */ e.jsx("div", { className: "mt-3 max-h-64 overflow-y-auto", children: A() })
|
|
1122
|
+
] })
|
|
1123
|
+
]
|
|
1124
|
+
}
|
|
1125
|
+
);
|
|
1126
|
+
};
|
|
1127
|
+
export {
|
|
1128
|
+
Z as C,
|
|
1129
|
+
ue as D,
|
|
1130
|
+
Y as E,
|
|
1131
|
+
q as P,
|
|
1132
|
+
W as Q,
|
|
1133
|
+
Q as S,
|
|
1134
|
+
J as a,
|
|
1135
|
+
ee as b,
|
|
1136
|
+
se as c,
|
|
1137
|
+
_ as d,
|
|
1138
|
+
te as e,
|
|
1139
|
+
de as f,
|
|
1140
|
+
ie as g
|
|
1141
|
+
};
|
|
1142
|
+
//# sourceMappingURL=enhanced-components-DUw2KrmQ.js.map
|