@therealtinhtute/baroiplayer 1.0.8 → 1.2.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-By-4-kGs.cjs +2 -0
- package/dist/core-plugins-By-4-kGs.cjs.map +1 -0
- package/dist/core-plugins-DSBWcTuX.js +821 -0
- package/dist/core-plugins-DSBWcTuX.js.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-B_l3cist.js +1142 -0
- package/dist/enhanced-components-B_l3cist.js.map +1 -0
- package/dist/enhanced-components-BspFs9OO.cjs +2 -0
- package/dist/enhanced-components-BspFs9OO.cjs.map +1 -0
- package/dist/hooks-BXwI8QG6.cjs +4 -0
- package/dist/hooks-BXwI8QG6.cjs.map +1 -0
- package/dist/hooks-Bpi-jDiO.js +1816 -0
- package/dist/hooks-Bpi-jDiO.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 +6273 -16
- package/dist/index.mjs.map +1 -0
- package/dist/minimal-components-C4z900Ro.js +1926 -0
- package/dist/minimal-components-C4z900Ro.js.map +1 -0
- package/dist/minimal-components-v4qBp6jv.cjs +2 -0
- package/dist/minimal-components-v4qBp6jv.cjs.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 +201 -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 +281 -224
- 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 +14 -20
- 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 +21 -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 +77 -58
- 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 +262 -197
- 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 +61 -55
- package/src/components/unified/media-player.tsx +3 -3
- package/src/components/variants/minimal/AccessibleMinimalPlayer.tsx +528 -502
- package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.tsx +110 -89
- 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 +76 -72
- 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 +157 -139
- package/src/core/plugins/examples/analytics-plugin.ts +229 -230
- package/src/core/plugins/index.ts +26 -26
- package/src/core/plugins/registry.ts +544 -325
- package/src/core/plugins/types.ts +115 -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 +98 -99
- package/src/core/providers/lazy-provider.tsx +14 -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 +391 -409
- package/src/features/picture-in-picture/pip-manager.ts +364 -365
- package/src/features/playlist/playlist-manager.ts +605 -585
- package/src/features/subtitles/subtitle-manager.ts +424 -430
- package/src/features/subtitles/subtitle-parser.ts +277 -273
- package/src/features/thumbnails/thumbnail-generator.ts +511 -502
- package/src/hooks/__tests__/currentTime-fix.test.ts +149 -0
- 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 +171 -81
- package/src/hooks/use-focus-trap.tsx +162 -0
- package/src/hooks/use-intelligent-preloading.ts +256 -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 +193 -160
- package/src/hooks/use-media-state.ts +63 -59
- package/src/hooks/use-memory-optimization.ts +121 -119
- 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 +229 -0
- package/src/hooks/use-touch-gestures.ts +427 -383
- package/src/hooks/useEnhancedSubtitles.ts +245 -245
- package/src/hooks/useKeyboardShortcuts.ts +84 -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 +107 -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 +4 -7
- 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 +169 -0
- package/src/test/performance-utils.ts +192 -0
- package/src/test/setup.ts +256 -41
- package/src/types/events.ts +30 -30
- package/src/types/formats.ts +56 -72
- package/src/types/index.ts +16 -38
- 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,821 @@
|
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var v = (r, t, e) => t in r ? y(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var a = (r, t, e) => v(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { E as w } from "./core-events-DunPHKRE.js";
|
|
5
|
+
class l extends Error {
|
|
6
|
+
constructor(t, e, i, n) {
|
|
7
|
+
super(`Plugin '${t}' failed during ${e}: ${i}`), this.pluginName = t, this.phase = e, this.originalError = n, this.name = "PluginError";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
class h extends l {
|
|
11
|
+
constructor(t, e) {
|
|
12
|
+
super(t, "initialize", `Missing dependencies: ${e.join(", ")}`), this.missingDependencies = e, this.name = "PluginDependencyError";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
class f extends l {
|
|
16
|
+
constructor(t, e) {
|
|
17
|
+
super(t, "activate", `Conflicts with active plugins: ${e.join(", ")}`), this.conflictingPlugins = e, this.name = "PluginConflictError";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
class d {
|
|
21
|
+
constructor(t = "[Plugin]") {
|
|
22
|
+
a(this, "prefix");
|
|
23
|
+
this.prefix = t;
|
|
24
|
+
}
|
|
25
|
+
info(t, e) {
|
|
26
|
+
e ? console.info(`${this.prefix} ${t}`, e) : console.info(`${this.prefix} ${t}`);
|
|
27
|
+
}
|
|
28
|
+
warn(t, e) {
|
|
29
|
+
e ? console.warn(`${this.prefix} ${t}`, e) : console.warn(`${this.prefix} ${t}`);
|
|
30
|
+
}
|
|
31
|
+
error(t, e) {
|
|
32
|
+
e ? console.error(`${this.prefix} ${t}`, e) : console.error(`${this.prefix} ${t}`);
|
|
33
|
+
}
|
|
34
|
+
debug(t, e) {
|
|
35
|
+
process.env.NODE_ENV === "development" && (e ? console.debug(`${this.prefix} ${t}`, e) : console.debug(`${this.prefix} ${t}`));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
class b {
|
|
39
|
+
static validateMetadata(t) {
|
|
40
|
+
const { metadata: e } = t;
|
|
41
|
+
if (!e.name || typeof e.name != "string")
|
|
42
|
+
throw new Error("Plugin metadata must include a valid name");
|
|
43
|
+
if (!e.version || typeof e.version != "string")
|
|
44
|
+
throw new Error("Plugin metadata must include a valid version");
|
|
45
|
+
if (!e.description || typeof e.description != "string")
|
|
46
|
+
throw new Error("Plugin metadata must include a valid description");
|
|
47
|
+
if (!e.category)
|
|
48
|
+
throw new Error("Plugin metadata must include a valid category");
|
|
49
|
+
if (!e.priority)
|
|
50
|
+
throw new Error("Plugin metadata must include a valid priority");
|
|
51
|
+
return !0;
|
|
52
|
+
}
|
|
53
|
+
static validateConfig(t, e) {
|
|
54
|
+
if (!e) return !0;
|
|
55
|
+
for (const [i, n] of Object.entries(e)) {
|
|
56
|
+
const s = t[i];
|
|
57
|
+
if (n.required && s == null)
|
|
58
|
+
throw new Error(`Configuration property '${i}' is required`);
|
|
59
|
+
if (s !== void 0 && n.type && typeof s !== n.type)
|
|
60
|
+
throw new Error(`Configuration property '${i}' must be of type '${n.type}'`);
|
|
61
|
+
if (n.enum && !n.enum.includes(s))
|
|
62
|
+
throw new Error(`Configuration property '${i}' must be one of: ${n.enum.join(", ")}`);
|
|
63
|
+
if (n.min !== void 0 && typeof s == "number" && s < n.min)
|
|
64
|
+
throw new Error(`Configuration property '${i}' must be at least ${n.min}`);
|
|
65
|
+
if (n.max !== void 0 && typeof s == "number" && s > n.max)
|
|
66
|
+
throw new Error(`Configuration property '${i}' must be at most ${n.max}`);
|
|
67
|
+
}
|
|
68
|
+
return !0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
class P {
|
|
72
|
+
constructor() {
|
|
73
|
+
a(this, "metrics", /* @__PURE__ */ new Map());
|
|
74
|
+
}
|
|
75
|
+
measure(t, e, i) {
|
|
76
|
+
const n = `${t}.${e}`, s = performance.now(), o = () => {
|
|
77
|
+
const u = performance.now(), p = u - s, g = this.metrics.get(n) || {
|
|
78
|
+
calls: 0,
|
|
79
|
+
totalTime: 0,
|
|
80
|
+
averageTime: 0,
|
|
81
|
+
lastCall: 0
|
|
82
|
+
};
|
|
83
|
+
g.calls++, g.totalTime += p, g.averageTime = g.totalTime / g.calls, g.lastCall = u, this.metrics.set(n, g);
|
|
84
|
+
}, c = i();
|
|
85
|
+
return c instanceof Promise ? c.then(
|
|
86
|
+
(u) => (o(), u),
|
|
87
|
+
(u) => {
|
|
88
|
+
throw o(), u;
|
|
89
|
+
}
|
|
90
|
+
) : (o(), c);
|
|
91
|
+
}
|
|
92
|
+
getMetrics(t) {
|
|
93
|
+
if (t) {
|
|
94
|
+
const e = {};
|
|
95
|
+
for (const [i, n] of this.metrics.entries())
|
|
96
|
+
if (i.startsWith(`${t}.`)) {
|
|
97
|
+
const s = i.substring(t.length + 1);
|
|
98
|
+
e[s] = n;
|
|
99
|
+
}
|
|
100
|
+
return e;
|
|
101
|
+
}
|
|
102
|
+
return Object.fromEntries(this.metrics.entries());
|
|
103
|
+
}
|
|
104
|
+
reset(t) {
|
|
105
|
+
if (t)
|
|
106
|
+
for (const e of this.metrics.keys())
|
|
107
|
+
e.startsWith(`${t}.`) && this.metrics.delete(e);
|
|
108
|
+
else
|
|
109
|
+
this.metrics.clear();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const k = {
|
|
113
|
+
// Create a mock plugin context for testing
|
|
114
|
+
createMockContext() {
|
|
115
|
+
return {
|
|
116
|
+
state: {
|
|
117
|
+
isPlaying: !1,
|
|
118
|
+
currentTime: 0,
|
|
119
|
+
duration: 0,
|
|
120
|
+
volume: 1,
|
|
121
|
+
isMuted: !1,
|
|
122
|
+
isLoading: !1,
|
|
123
|
+
error: null
|
|
124
|
+
},
|
|
125
|
+
controls: {
|
|
126
|
+
play: () => Promise.resolve(),
|
|
127
|
+
pause: () => Promise.resolve(),
|
|
128
|
+
seek: (r) => Promise.resolve(),
|
|
129
|
+
setVolume: (r) => Promise.resolve(),
|
|
130
|
+
mute: () => Promise.resolve(),
|
|
131
|
+
unmute: () => Promise.resolve(),
|
|
132
|
+
toggleMute: () => Promise.resolve()
|
|
133
|
+
},
|
|
134
|
+
plugins: {
|
|
135
|
+
get: () => {
|
|
136
|
+
},
|
|
137
|
+
getAll: () => [],
|
|
138
|
+
isEnabled: () => !1
|
|
139
|
+
},
|
|
140
|
+
emit: () => {
|
|
141
|
+
},
|
|
142
|
+
on: () => () => {
|
|
143
|
+
},
|
|
144
|
+
element: null,
|
|
145
|
+
logger: new d("[MockPlugin]")
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
// Create a test plugin for development
|
|
149
|
+
createTestPlugin(r, t = {}) {
|
|
150
|
+
return {
|
|
151
|
+
metadata: {
|
|
152
|
+
name: r,
|
|
153
|
+
version: "1.0.0",
|
|
154
|
+
description: `Test plugin: ${r}`,
|
|
155
|
+
category: "ui",
|
|
156
|
+
priority: "medium"
|
|
157
|
+
},
|
|
158
|
+
initialize: async () => {
|
|
159
|
+
},
|
|
160
|
+
activate: async () => {
|
|
161
|
+
},
|
|
162
|
+
deactivate: async () => {
|
|
163
|
+
},
|
|
164
|
+
destroy: async () => {
|
|
165
|
+
},
|
|
166
|
+
healthCheck: () => !0,
|
|
167
|
+
...t
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
// Plugin timing utilities
|
|
171
|
+
time: {
|
|
172
|
+
async: async (r, t) => {
|
|
173
|
+
console.time(r);
|
|
174
|
+
try {
|
|
175
|
+
const e = await t();
|
|
176
|
+
return console.timeEnd(r), e;
|
|
177
|
+
} catch (e) {
|
|
178
|
+
throw console.timeEnd(r), e;
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
sync: (r, t) => {
|
|
182
|
+
console.time(r);
|
|
183
|
+
try {
|
|
184
|
+
const e = t();
|
|
185
|
+
return console.timeEnd(r), e;
|
|
186
|
+
} catch (e) {
|
|
187
|
+
throw console.timeEnd(r), e;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
class x {
|
|
193
|
+
constructor(t) {
|
|
194
|
+
a(this, "prefix");
|
|
195
|
+
this.prefix = `baroi-plugin-${t}`;
|
|
196
|
+
}
|
|
197
|
+
get(t, e) {
|
|
198
|
+
try {
|
|
199
|
+
const i = localStorage.getItem(`${this.prefix}-${t}`);
|
|
200
|
+
return i ? JSON.parse(i) : e;
|
|
201
|
+
} catch {
|
|
202
|
+
return e;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
set(t, e) {
|
|
206
|
+
try {
|
|
207
|
+
localStorage.setItem(`${this.prefix}-${t}`, JSON.stringify(e));
|
|
208
|
+
} catch (i) {
|
|
209
|
+
console.warn(`Failed to store plugin data for key: ${t}`, i);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
remove(t) {
|
|
213
|
+
try {
|
|
214
|
+
localStorage.removeItem(`${this.prefix}-${t}`);
|
|
215
|
+
} catch (e) {
|
|
216
|
+
console.warn(`Failed to remove plugin data for key: ${t}`, e);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
clear() {
|
|
220
|
+
try {
|
|
221
|
+
Object.keys(localStorage).filter((e) => e.startsWith(`${this.prefix}-`)).forEach((e) => localStorage.removeItem(e));
|
|
222
|
+
} catch (t) {
|
|
223
|
+
console.warn("Failed to clear plugin data", t);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const z = new d(), A = new P();
|
|
228
|
+
class I {
|
|
229
|
+
constructor(t) {
|
|
230
|
+
a(this, "plugins", /* @__PURE__ */ new Map());
|
|
231
|
+
a(this, "pluginConfigs", /* @__PURE__ */ new Map());
|
|
232
|
+
a(this, "pluginContexts", /* @__PURE__ */ new Map());
|
|
233
|
+
a(this, "enabledPlugins", /* @__PURE__ */ new Set());
|
|
234
|
+
a(this, "eventBus", new w());
|
|
235
|
+
a(this, "logger");
|
|
236
|
+
this.logger = t || new d("[PluginRegistry]");
|
|
237
|
+
}
|
|
238
|
+
register(t, e, i = {}) {
|
|
239
|
+
let n, s, o = {};
|
|
240
|
+
try {
|
|
241
|
+
if (typeof t == "string")
|
|
242
|
+
n = t, s = e, o = i;
|
|
243
|
+
else {
|
|
244
|
+
const c = t;
|
|
245
|
+
o = e || {}, s = c(o), n = s?.metadata?.name;
|
|
246
|
+
}
|
|
247
|
+
if (!n || !s)
|
|
248
|
+
throw new l("unknown", "initialize", "Invalid plugin registration payload");
|
|
249
|
+
if (this.plugins.has(n))
|
|
250
|
+
throw new l(n, "initialize", "Plugin already registered");
|
|
251
|
+
this.plugins.set(n, s), this.pluginConfigs.set(n, o), this.logger.info(`Plugin '${n}' registered successfully`), this.eventBus.emit("plugin:registered", { name: n, plugin: s });
|
|
252
|
+
} catch (c) {
|
|
253
|
+
const u = n || s?.metadata?.name || "unknown";
|
|
254
|
+
throw this.logger.error(`Failed to register plugin '${u}'`, c), this.eventBus.emit("plugin:error", { name: u, error: c }), c;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
async unregister(t, e) {
|
|
258
|
+
const i = this.plugins.get(t);
|
|
259
|
+
if (!i)
|
|
260
|
+
throw new l(t, "destroy", "Plugin not found");
|
|
261
|
+
try {
|
|
262
|
+
const n = e || this.pluginContexts.get(t) || this.createPluginContext(t);
|
|
263
|
+
this.enabledPlugins.has(t) && await this.deactivate(t, n), i.isInitialized && await i.destroy(n), this.plugins.delete(t), this.pluginConfigs.delete(t), this.pluginContexts.delete(t), this.enabledPlugins.delete(t), this.logger.info(`Plugin '${t}' unregistered successfully`);
|
|
264
|
+
} catch (n) {
|
|
265
|
+
throw this.logger.error(`Failed to unregister plugin '${t}'`, n), n;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
get(t) {
|
|
269
|
+
return this.plugins.get(t);
|
|
270
|
+
}
|
|
271
|
+
has(t) {
|
|
272
|
+
return this.plugins.has(t);
|
|
273
|
+
}
|
|
274
|
+
getAll() {
|
|
275
|
+
return Array.from(this.plugins.values()).sort(this.sortByPriority);
|
|
276
|
+
}
|
|
277
|
+
getByCategory(t) {
|
|
278
|
+
return this.getAll().filter((e) => e.metadata.category === t);
|
|
279
|
+
}
|
|
280
|
+
getActive() {
|
|
281
|
+
return Array.from(this.enabledPlugins).map((t) => this.plugins.get(t)).filter((t) => !!t).sort(this.sortByPriority);
|
|
282
|
+
}
|
|
283
|
+
isEnabled(t) {
|
|
284
|
+
return this.enabledPlugins.has(t);
|
|
285
|
+
}
|
|
286
|
+
async initialize(t, e, i = {}) {
|
|
287
|
+
const n = this.plugins.get(t);
|
|
288
|
+
if (!n)
|
|
289
|
+
throw new l(t, "initialize", "Plugin not found");
|
|
290
|
+
this.ensureDependenciesExist(t);
|
|
291
|
+
const s = { ...this.pluginConfigs.get(t) || {}, ...i };
|
|
292
|
+
this.pluginConfigs.set(t, s), this.pluginContexts.set(t, e);
|
|
293
|
+
try {
|
|
294
|
+
await n.initialize(e, s);
|
|
295
|
+
} catch (o) {
|
|
296
|
+
throw this.logger.error(`Failed to initialize plugin '${t}'`, o), this.eventBus.emit("plugin:error", { name: t, error: o }), o;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
async activate(t, e) {
|
|
300
|
+
const i = this.plugins.get(t);
|
|
301
|
+
if (!i)
|
|
302
|
+
throw new l(t, "activate", "Plugin not found");
|
|
303
|
+
this.ensureDependenciesActive(t), this.ensureNoActiveConflicts(t), this.pluginContexts.set(t, e);
|
|
304
|
+
try {
|
|
305
|
+
await i.activate(e), this.enabledPlugins.add(t), this.eventBus.emit("plugin:enabled", { name: t, plugin: i });
|
|
306
|
+
} catch (n) {
|
|
307
|
+
throw this.logger.error(`Failed to activate plugin '${t}'`, n), this.eventBus.emit("plugin:error", { name: t, error: n }), n;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
async deactivate(t, e) {
|
|
311
|
+
const i = this.plugins.get(t);
|
|
312
|
+
if (!i)
|
|
313
|
+
throw new l(t, "deactivate", "Plugin not found");
|
|
314
|
+
this.pluginContexts.set(t, e);
|
|
315
|
+
try {
|
|
316
|
+
await i.deactivate(e), this.enabledPlugins.delete(t), this.eventBus.emit("plugin:disabled", { name: t, plugin: i });
|
|
317
|
+
} catch (n) {
|
|
318
|
+
throw this.logger.error(`Failed to deactivate plugin '${t}'`, n), this.eventBus.emit("plugin:error", { name: t, error: n }), n;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
async initializeAll(t) {
|
|
322
|
+
this.validateDependencies();
|
|
323
|
+
const e = this.getAll().map((i) => this.findPluginKey(i)).filter(Boolean);
|
|
324
|
+
for (const i of e)
|
|
325
|
+
await this.initialize(i, t);
|
|
326
|
+
}
|
|
327
|
+
async activateAll(t) {
|
|
328
|
+
const e = this.getAll().map((i) => this.findPluginKey(i)).filter(Boolean);
|
|
329
|
+
for (const i of e) {
|
|
330
|
+
const n = this.plugins.get(i);
|
|
331
|
+
n && (n.isInitialized || await this.initialize(i, t), await this.activate(i, t));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
async deactivateAll(t) {
|
|
335
|
+
const e = this.getAll().map((i) => this.findPluginKey(i)).filter(Boolean).reverse();
|
|
336
|
+
for (const i of e)
|
|
337
|
+
this.enabledPlugins.has(i) && await this.deactivate(i, t);
|
|
338
|
+
}
|
|
339
|
+
async destroyAll(t) {
|
|
340
|
+
await this.deactivateAll(t);
|
|
341
|
+
const e = Array.from(this.plugins.keys());
|
|
342
|
+
for (const i of e) {
|
|
343
|
+
const n = this.plugins.get(i);
|
|
344
|
+
n && n.isInitialized && await n.destroy(t);
|
|
345
|
+
}
|
|
346
|
+
this.plugins.clear(), this.pluginConfigs.clear(), this.pluginContexts.clear(), this.enabledPlugins.clear();
|
|
347
|
+
}
|
|
348
|
+
validateDependencies() {
|
|
349
|
+
for (const [n, s] of this.plugins.entries()) {
|
|
350
|
+
const o = (s.metadata.dependencies || []).filter(
|
|
351
|
+
(c) => !this.plugins.has(c)
|
|
352
|
+
);
|
|
353
|
+
if (o.length > 0)
|
|
354
|
+
throw new h(n, o);
|
|
355
|
+
}
|
|
356
|
+
const t = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set(), i = (n) => {
|
|
357
|
+
if (t.has(n)) return;
|
|
358
|
+
if (e.has(n))
|
|
359
|
+
throw new l(n, "initialize", "Circular dependency detected");
|
|
360
|
+
e.add(n);
|
|
361
|
+
const s = this.plugins.get(n);
|
|
362
|
+
if (s) {
|
|
363
|
+
for (const o of s.metadata.dependencies || [])
|
|
364
|
+
i(o);
|
|
365
|
+
e.delete(n), t.add(n);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
for (const n of this.plugins.keys())
|
|
369
|
+
i(n);
|
|
370
|
+
}
|
|
371
|
+
validateConflicts() {
|
|
372
|
+
for (const [t, e] of this.plugins.entries()) {
|
|
373
|
+
const i = (e.metadata.conflicts || []).filter(
|
|
374
|
+
(n) => this.plugins.has(n)
|
|
375
|
+
);
|
|
376
|
+
if (i.length > 0)
|
|
377
|
+
throw new f(t, i);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
healthCheck(t) {
|
|
381
|
+
if (typeof t == "string") {
|
|
382
|
+
const e = this.plugins.get(t);
|
|
383
|
+
if (!e) return !1;
|
|
384
|
+
try {
|
|
385
|
+
const i = e.onInitializeCalled;
|
|
386
|
+
return typeof i == "boolean" ? i : e.healthCheck ? !!e.healthCheck() : typeof e.isInitialized == "boolean" ? e.isInitialized : !1;
|
|
387
|
+
} catch {
|
|
388
|
+
return !1;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return this.healthCheckEnabledPlugins();
|
|
392
|
+
}
|
|
393
|
+
healthCheckAll() {
|
|
394
|
+
const t = {};
|
|
395
|
+
for (const e of this.plugins.keys())
|
|
396
|
+
t[e] = this.healthCheck(e);
|
|
397
|
+
return t;
|
|
398
|
+
}
|
|
399
|
+
async enable(t) {
|
|
400
|
+
const e = this.plugins.get(t);
|
|
401
|
+
if (!e)
|
|
402
|
+
throw new l(t, "activate", "Plugin not found");
|
|
403
|
+
if (this.enabledPlugins.has(t)) {
|
|
404
|
+
this.logger.warn(`Plugin '${t}' is already enabled`);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
const i = this.pluginContexts.get(t) || this.createPluginContext(t);
|
|
408
|
+
e.isInitialized || await this.initialize(t, i), await this.activate(t, i);
|
|
409
|
+
}
|
|
410
|
+
async disable(t) {
|
|
411
|
+
const e = this.plugins.get(t);
|
|
412
|
+
if (!e)
|
|
413
|
+
throw new l(t, "deactivate", "Plugin not found");
|
|
414
|
+
if (!this.enabledPlugins.has(t)) {
|
|
415
|
+
this.logger.warn(`Plugin '${t}' is already disabled`);
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const i = this.pluginContexts.get(t) || this.createPluginContext(t);
|
|
419
|
+
await this.deactivate(t, i), await e.destroy(i);
|
|
420
|
+
}
|
|
421
|
+
async configure(t, e) {
|
|
422
|
+
const i = this.plugins.get(t);
|
|
423
|
+
if (!i)
|
|
424
|
+
throw new l(t, "initialize", "Plugin not found");
|
|
425
|
+
try {
|
|
426
|
+
this.pluginConfigs.set(t, { ...this.pluginConfigs.get(t), ...e }), i.configure && await i.configure(e), this.logger.info(`Plugin '${t}' configured successfully`), this.eventBus.emit("plugin:configured", { name: t, config: e });
|
|
427
|
+
} catch (n) {
|
|
428
|
+
throw this.logger.error(`Failed to configure plugin '${t}'`, n), this.eventBus.emit("plugin:error", { name: t, error: n }), n;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
async enablePlugins(t) {
|
|
432
|
+
const e = this.resolveDependencies(t);
|
|
433
|
+
for (const i of e)
|
|
434
|
+
this.enabledPlugins.has(i) || await this.enable(i);
|
|
435
|
+
}
|
|
436
|
+
async disablePlugins(t) {
|
|
437
|
+
const e = [...t].reverse();
|
|
438
|
+
for (const i of e)
|
|
439
|
+
this.enabledPlugins.has(i) && await this.disable(i);
|
|
440
|
+
}
|
|
441
|
+
getEnabledPlugins() {
|
|
442
|
+
return this.getActive();
|
|
443
|
+
}
|
|
444
|
+
on(t, e) {
|
|
445
|
+
return this.eventBus.on(t, e), () => this.eventBus.off(t, e);
|
|
446
|
+
}
|
|
447
|
+
async healthCheckEnabledPlugins() {
|
|
448
|
+
const t = [];
|
|
449
|
+
for (const e of this.enabledPlugins) {
|
|
450
|
+
const i = this.plugins.get(e);
|
|
451
|
+
if (i)
|
|
452
|
+
try {
|
|
453
|
+
const n = i.healthCheck ? i.healthCheck() : !0, s = n instanceof Promise ? await n : !!n;
|
|
454
|
+
t.push({ name: e, healthy: s });
|
|
455
|
+
} catch (n) {
|
|
456
|
+
t.push({ name: e, healthy: !1, error: n });
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return t;
|
|
460
|
+
}
|
|
461
|
+
findPluginKey(t) {
|
|
462
|
+
for (const [e, i] of this.plugins.entries())
|
|
463
|
+
if (i === t) return e;
|
|
464
|
+
}
|
|
465
|
+
ensureDependenciesExist(t) {
|
|
466
|
+
const e = this.plugins.get(t);
|
|
467
|
+
if (!e) return;
|
|
468
|
+
const i = (e.metadata.dependencies || []).filter(
|
|
469
|
+
(n) => !this.plugins.has(n)
|
|
470
|
+
);
|
|
471
|
+
if (i.length > 0)
|
|
472
|
+
throw new h(t, i);
|
|
473
|
+
}
|
|
474
|
+
ensureDependenciesActive(t) {
|
|
475
|
+
const e = this.plugins.get(t);
|
|
476
|
+
if (!e) return;
|
|
477
|
+
const i = (e.metadata.dependencies || []).filter(
|
|
478
|
+
(n) => !this.enabledPlugins.has(n)
|
|
479
|
+
);
|
|
480
|
+
if (i.length > 0)
|
|
481
|
+
throw new h(t, i);
|
|
482
|
+
}
|
|
483
|
+
ensureNoActiveConflicts(t) {
|
|
484
|
+
const e = this.plugins.get(t);
|
|
485
|
+
if (!e) return;
|
|
486
|
+
const i = (e.metadata.conflicts || []).filter(
|
|
487
|
+
(n) => this.enabledPlugins.has(n)
|
|
488
|
+
);
|
|
489
|
+
if (i.length > 0)
|
|
490
|
+
throw new f(t, i);
|
|
491
|
+
}
|
|
492
|
+
createPluginContext(t) {
|
|
493
|
+
return {
|
|
494
|
+
state: {},
|
|
495
|
+
controls: {},
|
|
496
|
+
plugins: this,
|
|
497
|
+
emit: (e, i) => this.eventBus.emit(e, i),
|
|
498
|
+
on: (e, i) => (this.eventBus.on(e, i), () => this.eventBus.off(e, i)),
|
|
499
|
+
element: null,
|
|
500
|
+
logger: this.createPluginLogger(t)
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
createPluginLogger(t) {
|
|
504
|
+
return {
|
|
505
|
+
info: (e, i) => this.logger.info(`[${t}] ${e}`, i),
|
|
506
|
+
warn: (e, i) => this.logger.warn(`[${t}] ${e}`, i),
|
|
507
|
+
error: (e, i) => this.logger.error(`[${t}] ${e}`, i),
|
|
508
|
+
debug: (e, i) => this.logger.debug(`[${t}] ${e}`, i)
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
resolveDependencies(t) {
|
|
512
|
+
const e = [], i = /* @__PURE__ */ new Set(), n = (s) => {
|
|
513
|
+
if (e.includes(s)) return;
|
|
514
|
+
if (i.has(s))
|
|
515
|
+
throw new l(s, "initialize", "Circular dependency detected");
|
|
516
|
+
i.add(s);
|
|
517
|
+
const o = this.plugins.get(s);
|
|
518
|
+
if (!o)
|
|
519
|
+
throw new l(s, "initialize", "Plugin not found");
|
|
520
|
+
for (const c of o.metadata.dependencies || [])
|
|
521
|
+
n(c);
|
|
522
|
+
i.delete(s), e.push(s);
|
|
523
|
+
};
|
|
524
|
+
for (const s of t)
|
|
525
|
+
n(s);
|
|
526
|
+
return e;
|
|
527
|
+
}
|
|
528
|
+
sortByPriority(t, e) {
|
|
529
|
+
const i = {
|
|
530
|
+
high: 3,
|
|
531
|
+
medium: 2,
|
|
532
|
+
normal: 2,
|
|
533
|
+
low: 1
|
|
534
|
+
}, n = i[t.metadata.priority] || 1;
|
|
535
|
+
return (i[e.metadata.priority] || 1) - n;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
class m {
|
|
539
|
+
constructor(t) {
|
|
540
|
+
a(this, "metadata");
|
|
541
|
+
a(this, "context");
|
|
542
|
+
a(this, "config", {});
|
|
543
|
+
a(this, "initialized", !1);
|
|
544
|
+
a(this, "active", !1);
|
|
545
|
+
this.metadata = {
|
|
546
|
+
version: "1.0.0",
|
|
547
|
+
...t
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
// Plugin lifecycle methods - can be overridden by subclasses
|
|
551
|
+
async initialize(t, e = {}) {
|
|
552
|
+
if (this.initialized) {
|
|
553
|
+
t.logger.warn("Plugin already initialized");
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
this.context = t, this.config = { ...this.config, ...e };
|
|
557
|
+
try {
|
|
558
|
+
await this.onInitialize(), this.initialized = !0, t.logger.info("Plugin initialized");
|
|
559
|
+
} catch (i) {
|
|
560
|
+
throw t.logger.error("Failed to initialize plugin", i), i;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
async activate(t) {
|
|
564
|
+
if (!this.initialized)
|
|
565
|
+
throw new Error("Plugin must be initialized before activation");
|
|
566
|
+
if (this.active) {
|
|
567
|
+
t.logger.warn("Plugin already active");
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
try {
|
|
571
|
+
await this.onActivate(), this.active = !0, t.logger.info("Plugin activated");
|
|
572
|
+
} catch (e) {
|
|
573
|
+
throw t.logger.error("Failed to activate plugin", e), e;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
async deactivate(t) {
|
|
577
|
+
if (!this.active) {
|
|
578
|
+
t.logger.warn("Plugin already inactive");
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
try {
|
|
582
|
+
await this.onDeactivate(), this.active = !1, t.logger.info("Plugin deactivated");
|
|
583
|
+
} catch (e) {
|
|
584
|
+
throw t.logger.error("Failed to deactivate plugin", e), e;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
async destroy(t) {
|
|
588
|
+
this.active && await this.deactivate(t);
|
|
589
|
+
try {
|
|
590
|
+
await this.onDestroy(), this.initialized = !1, t.logger.info("Plugin destroyed");
|
|
591
|
+
} catch (e) {
|
|
592
|
+
throw t.logger.error("Failed to destroy plugin", e), e;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
async configure(t) {
|
|
596
|
+
const e = { ...this.config };
|
|
597
|
+
this.config = { ...this.config, ...t };
|
|
598
|
+
try {
|
|
599
|
+
await this.onConfigure(t, e), this.context?.logger.info("Plugin configured");
|
|
600
|
+
} catch (i) {
|
|
601
|
+
throw this.config = e, this.context?.logger.error("Failed to configure plugin", i), i;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
healthCheck() {
|
|
605
|
+
return this.initialized && this.onHealthCheck();
|
|
606
|
+
}
|
|
607
|
+
onDestroy() {
|
|
608
|
+
}
|
|
609
|
+
onConfigure(t, e) {
|
|
610
|
+
}
|
|
611
|
+
onHealthCheck() {
|
|
612
|
+
return !0;
|
|
613
|
+
}
|
|
614
|
+
// Utility methods for plugins
|
|
615
|
+
get state() {
|
|
616
|
+
return this.context?.state;
|
|
617
|
+
}
|
|
618
|
+
get controls() {
|
|
619
|
+
return this.context?.controls;
|
|
620
|
+
}
|
|
621
|
+
get element() {
|
|
622
|
+
return this.context?.element;
|
|
623
|
+
}
|
|
624
|
+
get logger() {
|
|
625
|
+
return this.context?.logger;
|
|
626
|
+
}
|
|
627
|
+
emit(t, e) {
|
|
628
|
+
this.context?.emit(t, e);
|
|
629
|
+
}
|
|
630
|
+
on(t, e) {
|
|
631
|
+
return this.context?.on(t, e) || (() => {
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
// Helper methods for common plugin patterns
|
|
635
|
+
addEventListeners(t, e) {
|
|
636
|
+
return Object.entries(e).forEach(([i, n]) => {
|
|
637
|
+
t.addEventListener(i, n);
|
|
638
|
+
}), () => {
|
|
639
|
+
Object.entries(e).forEach(([i, n]) => {
|
|
640
|
+
t.removeEventListener(i, n);
|
|
641
|
+
});
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
createConfig(t) {
|
|
645
|
+
return { ...t, ...this.config };
|
|
646
|
+
}
|
|
647
|
+
// Plugin status
|
|
648
|
+
get isInitialized() {
|
|
649
|
+
return this.initialized;
|
|
650
|
+
}
|
|
651
|
+
get isActive() {
|
|
652
|
+
return this.active;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
function B(r) {
|
|
656
|
+
return (t) => new r(t);
|
|
657
|
+
}
|
|
658
|
+
class C extends m {
|
|
659
|
+
constructor(e) {
|
|
660
|
+
super({
|
|
661
|
+
name: "analytics",
|
|
662
|
+
description: "Media player analytics and tracking",
|
|
663
|
+
category: "analytics",
|
|
664
|
+
priority: "low",
|
|
665
|
+
author: "BaroiPlayer Team"
|
|
666
|
+
});
|
|
667
|
+
a(this, "events", []);
|
|
668
|
+
a(this, "analyticsConfig");
|
|
669
|
+
a(this, "cleanupFunctions", []);
|
|
670
|
+
a(this, "reportTimer");
|
|
671
|
+
}
|
|
672
|
+
onInitialize() {
|
|
673
|
+
if (this.analyticsConfig = this.createConfig({
|
|
674
|
+
trackingId: "",
|
|
675
|
+
events: ["play", "pause", "seek", "ended", "error"],
|
|
676
|
+
samplingRate: 1,
|
|
677
|
+
debug: !1,
|
|
678
|
+
endpoint: "/api/analytics"
|
|
679
|
+
}), !this.analyticsConfig.trackingId)
|
|
680
|
+
throw new Error("Analytics plugin requires a tracking ID");
|
|
681
|
+
this.logger?.info("Analytics plugin initialized", {
|
|
682
|
+
trackingId: this.analyticsConfig.trackingId,
|
|
683
|
+
events: this.analyticsConfig.events
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
onActivate() {
|
|
687
|
+
const e = this.setupMediaEventListeners();
|
|
688
|
+
this.cleanupFunctions.push(e), this.analyticsConfig.endpoint && (this.reportTimer = setInterval(() => {
|
|
689
|
+
this.reportEvents();
|
|
690
|
+
}, 3e4), this.cleanupFunctions.push(() => {
|
|
691
|
+
this.reportTimer && clearInterval(this.reportTimer);
|
|
692
|
+
})), this.trackEvent("plugin_activated", { plugin: "analytics" }), this.logger?.info("Analytics tracking started");
|
|
693
|
+
}
|
|
694
|
+
onDeactivate() {
|
|
695
|
+
this.cleanupFunctions.forEach((e) => e()), this.cleanupFunctions = [], this.events.length > 0 && this.reportEvents(), this.trackEvent("plugin_deactivated", { plugin: "analytics" }), this.logger?.info("Analytics tracking stopped");
|
|
696
|
+
}
|
|
697
|
+
onConfigure(e) {
|
|
698
|
+
if (this.analyticsConfig = { ...this.analyticsConfig, ...e }, e.events) {
|
|
699
|
+
this.cleanupFunctions.forEach((n) => n()), this.cleanupFunctions = [];
|
|
700
|
+
const i = this.setupMediaEventListeners();
|
|
701
|
+
this.cleanupFunctions.push(i);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
setupMediaEventListeners() {
|
|
705
|
+
const e = [];
|
|
706
|
+
if (this.analyticsConfig.events.includes("play")) {
|
|
707
|
+
const i = this.on("media:play", (n) => {
|
|
708
|
+
this.trackEvent("play", n);
|
|
709
|
+
});
|
|
710
|
+
e.push(i);
|
|
711
|
+
}
|
|
712
|
+
if (this.analyticsConfig.events.includes("pause")) {
|
|
713
|
+
const i = this.on("media:pause", (n) => {
|
|
714
|
+
this.trackEvent("pause", n);
|
|
715
|
+
});
|
|
716
|
+
e.push(i);
|
|
717
|
+
}
|
|
718
|
+
if (this.analyticsConfig.events.includes("seek")) {
|
|
719
|
+
const i = this.on("media:seek", (n) => {
|
|
720
|
+
this.trackEvent("seek", n);
|
|
721
|
+
});
|
|
722
|
+
e.push(i);
|
|
723
|
+
}
|
|
724
|
+
if (this.analyticsConfig.events.includes("ended")) {
|
|
725
|
+
const i = this.on("media:ended", (n) => {
|
|
726
|
+
this.trackEvent("ended", n);
|
|
727
|
+
});
|
|
728
|
+
e.push(i);
|
|
729
|
+
}
|
|
730
|
+
if (this.analyticsConfig.events.includes("error")) {
|
|
731
|
+
const i = this.on("media:error", (n) => {
|
|
732
|
+
this.trackEvent("error", n);
|
|
733
|
+
});
|
|
734
|
+
e.push(i);
|
|
735
|
+
}
|
|
736
|
+
return () => {
|
|
737
|
+
e.forEach((i) => i());
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
trackEvent(e, i) {
|
|
741
|
+
if (Math.random() > this.analyticsConfig.samplingRate)
|
|
742
|
+
return;
|
|
743
|
+
const n = {
|
|
744
|
+
event: e,
|
|
745
|
+
timestamp: Date.now(),
|
|
746
|
+
data: {
|
|
747
|
+
...i,
|
|
748
|
+
trackingId: this.analyticsConfig.trackingId,
|
|
749
|
+
sessionId: this.generateSessionId(),
|
|
750
|
+
mediaState: {
|
|
751
|
+
currentTime: this.state?.currentTime,
|
|
752
|
+
duration: this.state?.duration,
|
|
753
|
+
volume: this.state?.volume,
|
|
754
|
+
isPlaying: this.state?.isPlaying
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
this.events.push(n), this.analyticsConfig.debug && this.logger?.info("Analytics event tracked", n), this.emit("analytics:event", n);
|
|
759
|
+
}
|
|
760
|
+
async reportEvents() {
|
|
761
|
+
if (this.events.length === 0 || !this.analyticsConfig.endpoint)
|
|
762
|
+
return;
|
|
763
|
+
const e = [...this.events];
|
|
764
|
+
this.events = [];
|
|
765
|
+
try {
|
|
766
|
+
const i = await fetch(this.analyticsConfig.endpoint, {
|
|
767
|
+
method: "POST",
|
|
768
|
+
headers: {
|
|
769
|
+
"Content-Type": "application/json"
|
|
770
|
+
},
|
|
771
|
+
body: JSON.stringify({
|
|
772
|
+
trackingId: this.analyticsConfig.trackingId,
|
|
773
|
+
events: e
|
|
774
|
+
})
|
|
775
|
+
});
|
|
776
|
+
if (!i.ok)
|
|
777
|
+
throw new Error(`Analytics report failed: ${i.status}`);
|
|
778
|
+
this.analyticsConfig.debug && this.logger?.info(`Reported ${e.length} analytics events`);
|
|
779
|
+
} catch (i) {
|
|
780
|
+
this.events.unshift(...e), this.logger?.error("Failed to report analytics events", i);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
generateSessionId() {
|
|
784
|
+
return `session_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
785
|
+
}
|
|
786
|
+
// Public API for manual event tracking
|
|
787
|
+
track(e, i) {
|
|
788
|
+
this.trackEvent(e, i);
|
|
789
|
+
}
|
|
790
|
+
// Get pending events count
|
|
791
|
+
getPendingEventsCount() {
|
|
792
|
+
return this.events.length;
|
|
793
|
+
}
|
|
794
|
+
// Flush all pending events
|
|
795
|
+
async flush() {
|
|
796
|
+
await this.reportEvents();
|
|
797
|
+
}
|
|
798
|
+
onHealthCheck() {
|
|
799
|
+
return this.events.length < 1e3;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
const F = (r) => new C(r), D = "1.0.0";
|
|
803
|
+
export {
|
|
804
|
+
C as A,
|
|
805
|
+
m as B,
|
|
806
|
+
d as C,
|
|
807
|
+
I as P,
|
|
808
|
+
D as a,
|
|
809
|
+
l as b,
|
|
810
|
+
h as c,
|
|
811
|
+
f as d,
|
|
812
|
+
B as e,
|
|
813
|
+
F as f,
|
|
814
|
+
b as g,
|
|
815
|
+
P as h,
|
|
816
|
+
k as i,
|
|
817
|
+
x as j,
|
|
818
|
+
z as k,
|
|
819
|
+
A as l
|
|
820
|
+
};
|
|
821
|
+
//# sourceMappingURL=core-plugins-DSBWcTuX.js.map
|