@therealtinhtute/baroiplayer 1.0.5 → 1.0.7
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/dist/index.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/src/components/media-player-error.tsx +2 -2
- package/dist/src/components/media-player-fullscreen.tsx +2 -2
- package/dist/src/components/media-player-play.tsx +2 -2
- package/dist/src/components/media-player-seek.tsx +1 -1
- package/dist/src/components/media-player-tooltip.tsx +1 -1
- package/dist/src/components/media-player-volume.tsx +3 -3
- package/dist/src/components/react-player-wrapper.tsx +5 -5
- package/dist/src/hooks/use-touch-gestures.ts +1 -1
- package/package.json +1 -1
- package/src/components/media-player-error.tsx +2 -2
- package/src/components/media-player-fullscreen.tsx +2 -2
- package/src/components/media-player-play.tsx +2 -2
- package/src/components/media-player-seek.tsx +1 -1
- package/src/components/media-player-tooltip.tsx +1 -1
- package/src/components/media-player-volume.tsx +3 -3
- package/src/components/react-player-wrapper.tsx +5 -5
- package/src/hooks/use-touch-gestures.ts +1 -1
- package/dist/context/media.js +0 -2
- package/dist/context/media.js.map +0 -1
- package/dist/context/media.mjs +0 -15
- package/dist/context/media.mjs.map +0 -1
- package/dist/context/store.js +0 -2
- package/dist/context/store.js.map +0 -1
- package/dist/context/store.mjs +0 -5
- package/dist/context/store.mjs.map +0 -1
- package/dist/context-Af84FynT.js +0 -1179
- package/dist/context-Af84FynT.js.map +0 -1
- package/dist/context-CwZnPdz0.cjs +0 -23
- package/dist/context-CwZnPdz0.cjs.map +0 -1
- package/dist/core-events-B5W_j8yU.js +0 -480
- package/dist/core-events-B5W_j8yU.js.map +0 -1
- package/dist/core-events-CN0-Vhhq.cjs +0 -2
- package/dist/core-events-CN0-Vhhq.cjs.map +0 -1
- package/dist/core-plugins-Bq9KLany.js +0 -696
- package/dist/core-plugins-Bq9KLany.js.map +0 -1
- package/dist/core-plugins-CPDSHMiQ.cjs +0 -2
- package/dist/core-plugins-CPDSHMiQ.cjs.map +0 -1
- package/dist/core.js +0 -37
- package/dist/core.js.map +0 -1
- package/dist/core.mjs +0 -1217
- package/dist/core.mjs.map +0 -1
- package/dist/enhanced-components-CXnYiOt6.cjs +0 -2
- package/dist/enhanced-components-CXnYiOt6.cjs.map +0 -1
- package/dist/enhanced-components-Da0TSvKe.js +0 -1073
- package/dist/enhanced-components-Da0TSvKe.js.map +0 -1
- package/dist/hooks-BCMilGRf.cjs +0 -4
- package/dist/hooks-BCMilGRf.cjs.map +0 -1
- package/dist/hooks-BPtHV1ZT.js +0 -2042
- package/dist/hooks-BPtHV1ZT.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/minimal-components-BHJMuaL7.cjs +0 -2
- package/dist/minimal-components-BHJMuaL7.cjs.map +0 -1
- package/dist/minimal-components-BmqRefl1.js +0 -2002
- package/dist/minimal-components-BmqRefl1.js.map +0 -1
- package/dist/mona-loading.gif +0 -0
- package/dist/performance-monitor--rzKTlbj.js +0 -302
- package/dist/performance-monitor--rzKTlbj.js.map +0 -1
- package/dist/performance-monitor-cjIvZE2D.cjs +0 -2
- package/dist/performance-monitor-cjIvZE2D.cjs.map +0 -1
- package/dist/src/adapters/videojs-adapter.d.ts.map +0 -1
- package/dist/src/adapters/videojs-adapter.js +0 -350
- package/dist/src/assets/mona-loading.gif +0 -0
- package/dist/src/components/AnimateLoading.d.ts.map +0 -1
- package/dist/src/components/AnimateLoading.js +0 -41
- package/dist/src/components/LoadingState.d.ts.map +0 -1
- package/dist/src/components/LoadingState.js +0 -111
- package/dist/src/components/accessibility/keyboard-help-overlay.d.ts.map +0 -1
- package/dist/src/components/accessibility/keyboard-help-overlay.js +0 -90
- package/dist/src/components/audio-player.d.ts.map +0 -1
- package/dist/src/components/audio-player.js +0 -31
- package/dist/src/components/basic/index.d.ts.map +0 -1
- package/dist/src/components/basic/index.js +0 -29
- package/dist/src/components/enhanced/advanced-features.d.ts.map +0 -1
- package/dist/src/components/enhanced/advanced-features.js +0 -64
- package/dist/src/components/enhanced/debug-panel.d.ts.map +0 -1
- package/dist/src/components/enhanced/debug-panel.js +0 -94
- package/dist/src/components/enhanced/enhanced-controls.d.ts.map +0 -1
- package/dist/src/components/enhanced/enhanced-controls.js +0 -233
- package/dist/src/components/enhanced/enhanced-media-player.d.ts.map +0 -1
- package/dist/src/components/enhanced/enhanced-media-player.js +0 -316
- package/dist/src/components/enhanced/error-handling.d.ts.map +0 -1
- package/dist/src/components/enhanced/error-handling.js +0 -153
- package/dist/src/components/enhanced/index.d.ts.map +0 -1
- package/dist/src/components/enhanced/index.js +0 -10
- package/dist/src/components/enhanced/media-player-enhanced.d.ts.map +0 -1
- package/dist/src/components/enhanced/media-player-enhanced.js +0 -250
- package/dist/src/components/examples/basic-video-player.d.ts.map +0 -1
- package/dist/src/components/examples/basic-video-player.js +0 -16
- package/dist/src/components/examples/custom-controls-example.d.ts.map +0 -1
- package/dist/src/components/examples/custom-controls-example.js +0 -12
- package/dist/src/components/examples/enhanced-controls-example.d.ts.map +0 -1
- package/dist/src/components/examples/enhanced-controls-example.js +0 -18
- package/dist/src/components/examples/enhanced-media-player-example.d.ts.map +0 -1
- package/dist/src/components/examples/enhanced-media-player-example.js +0 -13
- package/dist/src/components/examples/loading-states-demo.d.ts.map +0 -1
- package/dist/src/components/examples/loading-states-demo.js +0 -41
- package/dist/src/components/examples/react-19-demo.d.ts.map +0 -1
- package/dist/src/components/examples/react-19-demo.js +0 -104
- package/dist/src/components/examples/volume-orientation-demo.d.ts.map +0 -1
- package/dist/src/components/examples/volume-orientation-demo.js +0 -31
- package/dist/src/components/icon-demo.d.ts.map +0 -1
- package/dist/src/components/icon-demo.js +0 -16
- package/dist/src/components/icons/index.d.ts.map +0 -1
- package/dist/src/components/icons/index.js +0 -59
- package/dist/src/components/icons/svg-icons/ArrowLeftIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/ArrowLeftIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/ArrowRightIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/ArrowRightIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/AudioIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/AudioIcon.js +0 -4
- package/dist/src/components/icons/svg-icons/BackwardIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/BackwardIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/CameraIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/CameraIcon.js +0 -4
- package/dist/src/components/icons/svg-icons/CheckIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/CheckIcon.js +0 -4
- package/dist/src/components/icons/svg-icons/EnablePiPIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/EnablePiPIcon.js +0 -5
- package/dist/src/components/icons/svg-icons/ForwardIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/ForwardIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/FullscreenEnterIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/FullscreenEnterIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/FullscreenExitIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/FullscreenExitIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/LoadingIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/LoadingIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/PauseIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/PauseIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/PlayIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/PlayIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/PlaybackSpeedIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/PlaybackSpeedIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/QualityIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/QualityIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/SettingsIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/SettingsIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/SliderIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/SliderIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/SubtitleIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/SubtitleIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/SubtitleOffIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/SubtitleOffIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/UnPiPIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/UnPiPIcon.js +0 -5
- package/dist/src/components/icons/svg-icons/VolumeMutedIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/VolumeMutedIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/VolumeOneIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/VolumeOneIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/VolumeThreeIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/VolumeThreeIcon.js +0 -3
- package/dist/src/components/icons/svg-icons/VolumeTwoIcon.d.ts.map +0 -1
- package/dist/src/components/icons/svg-icons/VolumeTwoIcon.js +0 -3
- package/dist/src/components/legacy.d.ts.map +0 -1
- package/dist/src/components/legacy.js +0 -52
- package/dist/src/components/media-metadata-display.d.ts.map +0 -1
- package/dist/src/components/media-metadata-display.js +0 -20
- package/dist/src/components/media-player-audio.d.ts.map +0 -1
- package/dist/src/components/media-player-audio.js +0 -18
- package/dist/src/components/media-player-controls.d.ts.map +0 -1
- package/dist/src/components/media-player-controls.js +0 -150
- package/dist/src/components/media-player-error.d.ts.map +0 -1
- package/dist/src/components/media-player-error.js +0 -85
- package/dist/src/components/media-player-fullscreen.d.ts.map +0 -1
- package/dist/src/components/media-player-fullscreen.js +0 -68
- package/dist/src/components/media-player-hls.d.ts.map +0 -1
- package/dist/src/components/media-player-hls.js +0 -20
- package/dist/src/components/media-player-loading.d.ts.map +0 -1
- package/dist/src/components/media-player-loading.js +0 -53
- package/dist/src/components/media-player-play.d.ts.map +0 -1
- package/dist/src/components/media-player-play.js +0 -44
- package/dist/src/components/media-player-root.d.ts.map +0 -1
- package/dist/src/components/media-player-root.js +0 -243
- package/dist/src/components/media-player-seek.d.ts.map +0 -1
- package/dist/src/components/media-player-seek.js +0 -92
- package/dist/src/components/media-player-time.d.ts.map +0 -1
- package/dist/src/components/media-player-time.js +0 -57
- package/dist/src/components/media-player-tooltip.d.ts.map +0 -1
- package/dist/src/components/media-player-tooltip.js +0 -14
- package/dist/src/components/media-player-video.d.ts.map +0 -1
- package/dist/src/components/media-player-video.js +0 -18
- package/dist/src/components/media-player-volume.d.ts.map +0 -1
- package/dist/src/components/media-player-volume.js +0 -88
- package/dist/src/components/media-player.d.ts.map +0 -1
- package/dist/src/components/media-player.js +0 -67
- package/dist/src/components/media-suspense.d.ts.map +0 -1
- package/dist/src/components/media-suspense.js +0 -173
- package/dist/src/components/player-settings-form.d.ts.map +0 -1
- package/dist/src/components/player-settings-form.js +0 -46
- package/dist/src/components/react-player-wrapper.d.ts.map +0 -1
- package/dist/src/components/react-player-wrapper.js +0 -163
- package/dist/src/components/simple-video-player.d.ts.map +0 -1
- package/dist/src/components/simple-video-player.js +0 -41
- package/dist/src/components/ui/enhanced-seek-bar.d.ts.map +0 -1
- package/dist/src/components/ui/enhanced-seek-bar.js +0 -112
- package/dist/src/components/ui/fullscreen-button.d.ts.map +0 -1
- package/dist/src/components/ui/fullscreen-button.js +0 -21
- package/dist/src/components/ui/media-resource-preloader.d.ts.map +0 -1
- package/dist/src/components/ui/media-resource-preloader.js +0 -295
- package/dist/src/components/ui/play-button.d.ts.map +0 -1
- package/dist/src/components/ui/play-button.js +0 -26
- package/dist/src/components/ui/seek-bar.d.ts.map +0 -1
- package/dist/src/components/ui/seek-bar.js +0 -54
- package/dist/src/components/ui/time-display.d.ts.map +0 -1
- package/dist/src/components/ui/time-display.js +0 -18
- package/dist/src/components/ui/volume-control.d.ts.map +0 -1
- package/dist/src/components/ui/volume-control.js +0 -71
- package/dist/src/components/unified/base-media-player.d.ts.map +0 -1
- package/dist/src/components/unified/base-media-player.js +0 -104
- package/dist/src/components/unified/media-player.d.ts.map +0 -1
- package/dist/src/components/unified/media-player.js +0 -41
- package/dist/src/components/variants/minimal/AccessibleMinimalPlayer.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/AccessibleMinimalPlayer.js +0 -322
- package/dist/src/components/variants/minimal/EnhancedMinimalMediaPlayer.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/EnhancedMinimalMediaPlayer.js +0 -280
- package/dist/src/components/variants/minimal/MinimalControls.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/MinimalControls.js +0 -19
- package/dist/src/components/variants/minimal/MinimalLoading.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/MinimalLoading.js +0 -6
- package/dist/src/components/variants/minimal/MinimalMediaPlayer.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/MinimalMediaPlayer.js +0 -135
- package/dist/src/components/variants/minimal/MinimalOverlay.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/MinimalOverlay.js +0 -15
- package/dist/src/components/variants/minimal/MinimalPlayButton.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/MinimalPlayButton.js +0 -29
- package/dist/src/components/variants/minimal/MinimalSeekBar.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/MinimalSeekBar.js +0 -73
- package/dist/src/components/variants/minimal/MinimalVolumeControl.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/MinimalVolumeControl.js +0 -29
- package/dist/src/components/variants/minimal/SimpleMinimalPlayer.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/SimpleMinimalPlayer.js +0 -51
- package/dist/src/components/variants/minimal/components/CenterPlayButton.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/CenterPlayButton.js +0 -8
- package/dist/src/components/variants/minimal/components/ControlBar.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/ControlBar.js +0 -10
- package/dist/src/components/variants/minimal/components/EnhancedSettingsMenu.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/EnhancedSettingsMenu.js +0 -68
- package/dist/src/components/variants/minimal/components/PlaybackControls.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/PlaybackControls.js +0 -9
- package/dist/src/components/variants/minimal/components/RightControls.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/RightControls.js +0 -40
- package/dist/src/components/variants/minimal/components/SeekBar.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/SeekBar.js +0 -43
- package/dist/src/components/variants/minimal/components/SettingsDropdown.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/SettingsDropdown.js +0 -18
- package/dist/src/components/variants/minimal/components/SubtitleDisplay.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/SubtitleDisplay.js +0 -6
- package/dist/src/components/variants/minimal/components/TimeDisplay.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/TimeDisplay.js +0 -5
- package/dist/src/components/variants/minimal/components/VideoElement.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/VideoElement.js +0 -4
- package/dist/src/components/variants/minimal/components/VolumeControl.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/components/VolumeControl.js +0 -99
- package/dist/src/components/variants/minimal/index.d.ts.map +0 -1
- package/dist/src/components/variants/minimal/index.js +0 -8
- package/dist/src/components/video-player.d.ts.map +0 -1
- package/dist/src/components/video-player.js +0 -38
- package/dist/src/context/error-handling.d.ts.map +0 -1
- package/dist/src/context/error-handling.js +0 -300
- package/dist/src/context/media-context.d.ts.map +0 -1
- package/dist/src/context/media-context.js +0 -121
- package/dist/src/context/media-provider.d.ts.map +0 -1
- package/dist/src/context/media-provider.js +0 -164
- package/dist/src/context/media-store.d.ts.map +0 -1
- package/dist/src/context/media-store.js +0 -273
- package/dist/src/context/persistence.d.ts.map +0 -1
- package/dist/src/context/persistence.js +0 -356
- package/dist/src/core/events/event-system.d.ts.map +0 -1
- package/dist/src/core/events/event-system.js +0 -288
- package/dist/src/core/events/hooks.d.ts.map +0 -1
- package/dist/src/core/events/hooks.js +0 -198
- package/dist/src/core/events/index.d.ts.map +0 -1
- package/dist/src/core/events/index.js +0 -7
- package/dist/src/core/events/middleware.d.ts.map +0 -1
- package/dist/src/core/events/middleware.js +0 -219
- package/dist/src/core/index.d.ts.map +0 -1
- package/dist/src/core/index.js +0 -15
- package/dist/src/core/optimization/bundle-optimizer.d.ts.map +0 -1
- package/dist/src/core/optimization/bundle-optimizer.js +0 -217
- package/dist/src/core/performance/cicd.d.ts.map +0 -1
- package/dist/src/core/performance/cicd.js +0 -83
- package/dist/src/core/performance/index.d.ts.map +0 -1
- package/dist/src/core/performance/index.js +0 -14
- package/dist/src/core/performance/media-loading-optimizer.d.ts.map +0 -1
- package/dist/src/core/performance/media-loading-optimizer.js +0 -404
- package/dist/src/core/performance/performance-budgets.d.ts.map +0 -1
- package/dist/src/core/performance/performance-budgets.js +0 -326
- package/dist/src/core/performance/performance-monitor.d.ts.map +0 -1
- package/dist/src/core/performance/performance-monitor.js +0 -297
- package/dist/src/core/performance/performance-testing.d.ts.map +0 -1
- package/dist/src/core/performance/performance-testing.js +0 -314
- package/dist/src/core/plugins/base-plugin.d.ts.map +0 -1
- package/dist/src/core/plugins/base-plugin.js +0 -151
- package/dist/src/core/plugins/enhanced-plugin-system.d.ts.map +0 -1
- package/dist/src/core/plugins/enhanced-plugin-system.js +0 -305
- package/dist/src/core/plugins/examples/analytics-plugin.d.ts.map +0 -1
- package/dist/src/core/plugins/examples/analytics-plugin.js +0 -191
- package/dist/src/core/plugins/index.d.ts.map +0 -1
- package/dist/src/core/plugins/index.js +0 -9
- package/dist/src/core/plugins/registry.d.ts.map +0 -1
- package/dist/src/core/plugins/registry.js +0 -261
- package/dist/src/core/plugins/types.d.ts.map +0 -1
- package/dist/src/core/plugins/types.js +0 -31
- package/dist/src/core/plugins/utils.d.ts.map +0 -1
- package/dist/src/core/plugins/utils.js +0 -274
- package/dist/src/core/progressive-loading.d.ts.map +0 -1
- package/dist/src/core/progressive-loading.js +0 -239
- package/dist/src/core/providers/enhanced-hls-provider.d.ts.map +0 -1
- package/dist/src/core/providers/enhanced-hls-provider.js +0 -273
- package/dist/src/core/providers/service-provider.d.ts.map +0 -1
- package/dist/src/core/providers/service-provider.js +0 -105
- package/dist/src/core/utils.d.ts.map +0 -1
- package/dist/src/core/utils.js +0 -21
- package/dist/src/features/media-session/media-session-manager.d.ts.map +0 -1
- package/dist/src/features/media-session/media-session-manager.js +0 -331
- package/dist/src/features/picture-in-picture/pip-manager.d.ts.map +0 -1
- package/dist/src/features/picture-in-picture/pip-manager.js +0 -353
- package/dist/src/features/playlist/playlist-manager.d.ts.map +0 -1
- package/dist/src/features/playlist/playlist-manager.js +0 -475
- package/dist/src/features/subtitles/subtitle-manager.d.ts.map +0 -1
- package/dist/src/features/subtitles/subtitle-manager.js +0 -335
- package/dist/src/features/subtitles/subtitle-parser.d.ts.map +0 -1
- package/dist/src/features/subtitles/subtitle-parser.js +0 -217
- package/dist/src/features/thumbnails/thumbnail-generator.d.ts.map +0 -1
- package/dist/src/features/thumbnails/thumbnail-generator.js +0 -388
- package/dist/src/hooks/accessibility/index.d.ts.map +0 -1
- package/dist/src/hooks/accessibility/index.js +0 -4
- package/dist/src/hooks/accessibility/use-accessibility-preferences.d.ts.map +0 -1
- package/dist/src/hooks/accessibility/use-accessibility-preferences.js +0 -156
- package/dist/src/hooks/accessibility/use-focus-management.d.ts.map +0 -1
- package/dist/src/hooks/accessibility/use-focus-management.js +0 -142
- package/dist/src/hooks/accessibility/use-keyboard-shortcuts.d.ts.map +0 -1
- package/dist/src/hooks/accessibility/use-keyboard-shortcuts.js +0 -101
- package/dist/src/hooks/accessibility/use-screen-reader.d.ts.map +0 -1
- package/dist/src/hooks/accessibility/use-screen-reader.js +0 -148
- package/dist/src/hooks/core/index.d.ts.map +0 -1
- package/dist/src/hooks/core/index.js +0 -19
- package/dist/src/hooks/legacy.d.ts.map +0 -1
- package/dist/src/hooks/legacy.js +0 -17
- package/dist/src/hooks/use-enhanced-media-player.d.ts.map +0 -1
- package/dist/src/hooks/use-enhanced-media-player.js +0 -395
- package/dist/src/hooks/use-intelligent-preloading.d.ts.map +0 -1
- package/dist/src/hooks/use-intelligent-preloading.js +0 -258
- package/dist/src/hooks/use-keyboard-controls.d.ts.map +0 -1
- package/dist/src/hooks/use-keyboard-controls.js +0 -83
- package/dist/src/hooks/use-media-actions.d.ts.map +0 -1
- package/dist/src/hooks/use-media-actions.js +0 -121
- package/dist/src/hooks/use-media-metadata.d.ts.map +0 -1
- package/dist/src/hooks/use-media-metadata.js +0 -74
- package/dist/src/hooks/use-media-optimistic.d.ts.map +0 -1
- package/dist/src/hooks/use-media-optimistic.js +0 -205
- package/dist/src/hooks/use-media-player.d.ts.map +0 -1
- package/dist/src/hooks/use-media-player.js +0 -251
- package/dist/src/hooks/use-media-state.d.ts.map +0 -1
- package/dist/src/hooks/use-media-state.js +0 -162
- package/dist/src/hooks/use-memory-optimization.d.ts.map +0 -1
- package/dist/src/hooks/use-memory-optimization.js +0 -288
- package/dist/src/hooks/use-optimistic-controls.d.ts.map +0 -1
- package/dist/src/hooks/use-optimistic-controls.js +0 -60
- package/dist/src/hooks/use-optimized-media.d.ts.map +0 -1
- package/dist/src/hooks/use-optimized-media.js +0 -211
- package/dist/src/hooks/use-touch-gestures.d.ts.map +0 -1
- package/dist/src/hooks/use-touch-gestures.js +0 -289
- package/dist/src/hooks/useEnhancedSubtitles.d.ts.map +0 -1
- package/dist/src/hooks/useEnhancedSubtitles.js +0 -205
- package/dist/src/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/src/hooks/useKeyboardShortcuts.js +0 -59
- package/dist/src/hooks/useMediaControls.d.ts.map +0 -1
- package/dist/src/hooks/useMediaControls.js +0 -44
- package/dist/src/hooks/useScreenshot.d.ts.map +0 -1
- package/dist/src/hooks/useScreenshot.js +0 -56
- package/dist/src/hooks/useSubtitles.d.ts.map +0 -1
- package/dist/src/hooks/useSubtitles.js +0 -73
- package/dist/src/hooks/useVideoPlayer.d.ts.map +0 -1
- package/dist/src/hooks/useVideoPlayer.js +0 -184
- package/dist/src/icons/components/FullscreenIcon.d.ts.map +0 -1
- package/dist/src/icons/components/FullscreenIcon.js +0 -11
- package/dist/src/icons/components/SettingsIcon.d.ts.map +0 -1
- package/dist/src/icons/components/SettingsIcon.js +0 -11
- package/dist/src/icons/components/animated/LoadingIcon.d.ts.map +0 -1
- package/dist/src/icons/components/animated/LoadingIcon.js +0 -11
- package/dist/src/icons/components/animated/PlayPauseIcon.d.ts.map +0 -1
- package/dist/src/icons/components/animated/PlayPauseIcon.js +0 -9
- package/dist/src/icons/components/media/PauseIcon.d.ts.map +0 -1
- package/dist/src/icons/components/media/PauseIcon.js +0 -12
- package/dist/src/icons/components/media/PlayIcon.d.ts.map +0 -1
- package/dist/src/icons/components/media/PlayIcon.js +0 -12
- package/dist/src/icons/components/volume/VolumeIcon.d.ts.map +0 -1
- package/dist/src/icons/components/volume/VolumeIcon.js +0 -11
- package/dist/src/icons/components/volume/VolumeOffIcon.d.ts.map +0 -1
- package/dist/src/icons/components/volume/VolumeOffIcon.js +0 -11
- package/dist/src/icons/index.d.ts.map +0 -1
- package/dist/src/icons/index.js +0 -45
- package/dist/src/icons/provider.d.ts.map +0 -1
- package/dist/src/icons/provider.js +0 -37
- package/dist/src/icons/types.d.ts.map +0 -1
- package/dist/src/icons/types.js +0 -1
- package/dist/src/index-enhanced.d.ts.map +0 -1
- package/dist/src/index-enhanced.js +0 -16
- package/dist/src/index-legacy.d.ts.map +0 -1
- package/dist/src/index-legacy.js +0 -97
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -90
- package/dist/src/index.minimal.d.ts.map +0 -1
- package/dist/src/index.minimal.js +0 -3
- package/dist/src/lib/deprecation.d.ts.map +0 -1
- package/dist/src/lib/deprecation.js +0 -31
- package/dist/src/lib/format-time.d.ts.map +0 -1
- package/dist/src/lib/format-time.js +0 -32
- package/dist/src/lib/index.d.ts.map +0 -1
- package/dist/src/lib/index.js +0 -3
- package/dist/src/lib/utils.d.ts.map +0 -1
- package/dist/src/lib/utils.js +0 -5
- package/dist/src/test/setup.d.ts.map +0 -1
- package/dist/src/test/setup.js +0 -65
- package/dist/src/types/events.d.ts.map +0 -1
- package/dist/src/types/events.js +0 -2
- package/dist/src/types/formats.d.ts.map +0 -1
- package/dist/src/types/formats.js +0 -63
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -4
- package/dist/utils-Db13763z.cjs +0 -9
- package/dist/utils-Db13763z.cjs.map +0 -1
- package/dist/utils-nTO4AnHo.js +0 -2809
- package/dist/utils-nTO4AnHo.js.map +0 -1
- package/dist/utils.js +0 -2
- package/dist/utils.js.map +0 -1
- package/dist/utils.mjs +0 -7
- package/dist/utils.mjs.map +0 -1
- package/src/adapters/videojs-adapter.js +0 -350
- package/src/components/AnimateLoading.js +0 -41
- package/src/components/LoadingState.js +0 -111
- package/src/components/accessibility/keyboard-help-overlay.js +0 -90
- package/src/components/audio-player.js +0 -31
- package/src/components/basic/index.js +0 -29
- package/src/components/enhanced/advanced-features.js +0 -64
- package/src/components/enhanced/debug-panel.js +0 -94
- package/src/components/enhanced/enhanced-controls.js +0 -233
- package/src/components/enhanced/enhanced-media-player.js +0 -316
- package/src/components/enhanced/error-handling.js +0 -153
- package/src/components/enhanced/index.js +0 -10
- package/src/components/enhanced/media-player-enhanced.js +0 -250
- package/src/components/examples/basic-video-player.js +0 -16
- package/src/components/examples/custom-controls-example.js +0 -12
- package/src/components/examples/enhanced-controls-example.js +0 -18
- package/src/components/examples/enhanced-media-player-example.js +0 -13
- package/src/components/examples/loading-states-demo.js +0 -41
- package/src/components/examples/react-19-demo.js +0 -104
- package/src/components/examples/volume-orientation-demo.js +0 -31
- package/src/components/icon-demo.js +0 -16
- package/src/components/icons/index.js +0 -59
- package/src/components/icons/svg-icons/ArrowLeftIcon.js +0 -3
- package/src/components/icons/svg-icons/ArrowRightIcon.js +0 -3
- package/src/components/icons/svg-icons/AudioIcon.js +0 -4
- package/src/components/icons/svg-icons/BackwardIcon.js +0 -3
- package/src/components/icons/svg-icons/CameraIcon.js +0 -4
- package/src/components/icons/svg-icons/CheckIcon.js +0 -4
- package/src/components/icons/svg-icons/EnablePiPIcon.js +0 -5
- package/src/components/icons/svg-icons/ForwardIcon.js +0 -3
- package/src/components/icons/svg-icons/FullscreenEnterIcon.js +0 -3
- package/src/components/icons/svg-icons/FullscreenExitIcon.js +0 -3
- package/src/components/icons/svg-icons/LoadingIcon.js +0 -3
- package/src/components/icons/svg-icons/PauseIcon.js +0 -3
- package/src/components/icons/svg-icons/PlayIcon.js +0 -3
- package/src/components/icons/svg-icons/PlaybackSpeedIcon.js +0 -3
- package/src/components/icons/svg-icons/QualityIcon.js +0 -3
- package/src/components/icons/svg-icons/SettingsIcon.js +0 -3
- package/src/components/icons/svg-icons/SliderIcon.js +0 -3
- package/src/components/icons/svg-icons/SubtitleIcon.js +0 -3
- package/src/components/icons/svg-icons/SubtitleOffIcon.js +0 -3
- package/src/components/icons/svg-icons/UnPiPIcon.js +0 -5
- package/src/components/icons/svg-icons/VolumeMutedIcon.js +0 -3
- package/src/components/icons/svg-icons/VolumeOneIcon.js +0 -3
- package/src/components/icons/svg-icons/VolumeThreeIcon.js +0 -3
- package/src/components/icons/svg-icons/VolumeTwoIcon.js +0 -3
- package/src/components/legacy.js +0 -52
- package/src/components/media-metadata-display.js +0 -20
- package/src/components/media-player-audio.js +0 -18
- package/src/components/media-player-controls.js +0 -150
- package/src/components/media-player-error.js +0 -85
- package/src/components/media-player-fullscreen.js +0 -68
- package/src/components/media-player-hls.js +0 -20
- package/src/components/media-player-loading.js +0 -53
- package/src/components/media-player-play.js +0 -44
- package/src/components/media-player-root.js +0 -243
- package/src/components/media-player-seek.js +0 -92
- package/src/components/media-player-time.js +0 -57
- package/src/components/media-player-tooltip.js +0 -14
- package/src/components/media-player-video.js +0 -18
- package/src/components/media-player-volume.js +0 -88
- package/src/components/media-player.js +0 -67
- package/src/components/media-suspense.js +0 -173
- package/src/components/player-settings-form.js +0 -46
- package/src/components/react-player-wrapper.js +0 -163
- package/src/components/simple-video-player.js +0 -41
- package/src/components/ui/enhanced-seek-bar.js +0 -112
- package/src/components/ui/fullscreen-button.js +0 -21
- package/src/components/ui/media-resource-preloader.js +0 -295
- package/src/components/ui/play-button.js +0 -26
- package/src/components/ui/seek-bar.js +0 -54
- package/src/components/ui/time-display.js +0 -18
- package/src/components/ui/volume-control.js +0 -71
- package/src/components/unified/base-media-player.js +0 -104
- package/src/components/unified/media-player.js +0 -41
- package/src/components/variants/minimal/AccessibleMinimalPlayer.js +0 -322
- package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.js +0 -280
- package/src/components/variants/minimal/MinimalControls.js +0 -19
- package/src/components/variants/minimal/MinimalLoading.js +0 -6
- package/src/components/variants/minimal/MinimalMediaPlayer.js +0 -135
- package/src/components/variants/minimal/MinimalOverlay.js +0 -15
- package/src/components/variants/minimal/MinimalPlayButton.js +0 -29
- package/src/components/variants/minimal/MinimalSeekBar.js +0 -73
- package/src/components/variants/minimal/MinimalVolumeControl.js +0 -29
- package/src/components/variants/minimal/SimpleMinimalPlayer.js +0 -51
- package/src/components/variants/minimal/components/CenterPlayButton.js +0 -8
- package/src/components/variants/minimal/components/ControlBar.js +0 -10
- package/src/components/variants/minimal/components/EnhancedSettingsMenu.js +0 -68
- package/src/components/variants/minimal/components/PlaybackControls.js +0 -9
- package/src/components/variants/minimal/components/RightControls.js +0 -40
- package/src/components/variants/minimal/components/SeekBar.js +0 -43
- package/src/components/variants/minimal/components/SettingsDropdown.js +0 -18
- package/src/components/variants/minimal/components/SubtitleDisplay.js +0 -6
- package/src/components/variants/minimal/components/TimeDisplay.js +0 -5
- package/src/components/variants/minimal/components/VideoElement.js +0 -4
- package/src/components/variants/minimal/components/VolumeControl.js +0 -99
- package/src/components/variants/minimal/index.js +0 -8
- package/src/components/video-player.js +0 -38
- package/src/context/error-handling.js +0 -300
- package/src/context/media-context.js +0 -121
- package/src/context/media-provider.js +0 -164
- package/src/context/media-store.js +0 -273
- package/src/context/persistence.js +0 -356
- package/src/core/events/event-system.js +0 -288
- package/src/core/events/hooks.js +0 -198
- package/src/core/events/index.js +0 -7
- package/src/core/events/middleware.js +0 -219
- package/src/core/index.js +0 -15
- package/src/core/optimization/bundle-optimizer.js +0 -217
- package/src/core/performance/cicd.js +0 -83
- package/src/core/performance/index.js +0 -14
- package/src/core/performance/media-loading-optimizer.js +0 -404
- package/src/core/performance/performance-budgets.js +0 -326
- package/src/core/performance/performance-monitor.js +0 -297
- package/src/core/performance/performance-testing.js +0 -314
- package/src/core/plugins/base-plugin.js +0 -151
- package/src/core/plugins/enhanced-plugin-system.js +0 -305
- package/src/core/plugins/examples/analytics-plugin.js +0 -191
- package/src/core/plugins/index.js +0 -9
- package/src/core/plugins/registry.js +0 -261
- package/src/core/plugins/types.js +0 -31
- package/src/core/plugins/utils.js +0 -274
- package/src/core/progressive-loading.js +0 -239
- package/src/core/providers/enhanced-hls-provider.js +0 -273
- package/src/core/providers/service-provider.js +0 -105
- package/src/core/utils.js +0 -21
- package/src/features/media-session/media-session-manager.js +0 -331
- package/src/features/picture-in-picture/pip-manager.js +0 -353
- package/src/features/playlist/playlist-manager.js +0 -475
- package/src/features/subtitles/subtitle-manager.js +0 -335
- package/src/features/subtitles/subtitle-parser.js +0 -217
- package/src/features/thumbnails/thumbnail-generator.js +0 -388
- package/src/hooks/accessibility/index.js +0 -4
- package/src/hooks/accessibility/use-accessibility-preferences.js +0 -156
- package/src/hooks/accessibility/use-focus-management.js +0 -142
- package/src/hooks/accessibility/use-keyboard-shortcuts.js +0 -101
- package/src/hooks/accessibility/use-screen-reader.js +0 -148
- package/src/hooks/core/index.js +0 -19
- package/src/hooks/legacy.js +0 -17
- package/src/hooks/use-enhanced-media-player.js +0 -395
- package/src/hooks/use-intelligent-preloading.js +0 -258
- package/src/hooks/use-keyboard-controls.js +0 -83
- package/src/hooks/use-media-actions.js +0 -121
- package/src/hooks/use-media-metadata.js +0 -74
- package/src/hooks/use-media-optimistic.js +0 -205
- package/src/hooks/use-media-player.js +0 -251
- package/src/hooks/use-media-state.js +0 -162
- package/src/hooks/use-memory-optimization.js +0 -288
- package/src/hooks/use-optimistic-controls.js +0 -60
- package/src/hooks/use-optimized-media.js +0 -211
- package/src/hooks/use-touch-gestures.js +0 -289
- package/src/hooks/useEnhancedSubtitles.js +0 -205
- package/src/hooks/useKeyboardShortcuts.js +0 -59
- package/src/hooks/useMediaControls.js +0 -44
- package/src/hooks/useScreenshot.js +0 -56
- package/src/hooks/useSubtitles.js +0 -73
- package/src/hooks/useVideoPlayer.js +0 -184
- package/src/icons/components/FullscreenIcon.js +0 -11
- package/src/icons/components/SettingsIcon.js +0 -11
- package/src/icons/components/animated/LoadingIcon.js +0 -11
- package/src/icons/components/animated/PlayPauseIcon.js +0 -9
- package/src/icons/components/media/PauseIcon.js +0 -12
- package/src/icons/components/media/PlayIcon.js +0 -12
- package/src/icons/components/volume/VolumeIcon.js +0 -11
- package/src/icons/components/volume/VolumeOffIcon.js +0 -11
- package/src/icons/index.js +0 -45
- package/src/icons/provider.js +0 -37
- package/src/icons/types.js +0 -1
- package/src/index-enhanced.js +0 -16
- package/src/index-legacy.js +0 -97
- package/src/index.js +0 -90
- package/src/index.minimal.js +0 -3
- package/src/lib/deprecation.js +0 -31
- package/src/lib/format-time.js +0 -32
- package/src/lib/index.js +0 -3
- package/src/lib/utils.js +0 -5
- package/src/test/setup.js +0 -65
- package/src/types/events.js +0 -2
- package/src/types/formats.js +0 -63
- package/src/types/index.js +0 -4
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { EventBus } from '../events/event-system';
|
|
2
|
-
import { PluginError, PluginDependencyError, PluginConflictError } from './types';
|
|
3
|
-
// Plugin registry implementation
|
|
4
|
-
export class PluginRegistry {
|
|
5
|
-
plugins = new Map();
|
|
6
|
-
pluginConfigs = new Map();
|
|
7
|
-
enabledPlugins = new Set();
|
|
8
|
-
eventBus = new EventBus();
|
|
9
|
-
logger;
|
|
10
|
-
constructor(logger) {
|
|
11
|
-
this.logger = logger;
|
|
12
|
-
}
|
|
13
|
-
// Register a plugin factory
|
|
14
|
-
async register(factory, config = {}) {
|
|
15
|
-
try {
|
|
16
|
-
const plugin = factory(config);
|
|
17
|
-
const { name, dependencies = [], conflicts = [] } = plugin.metadata;
|
|
18
|
-
// Check if plugin already exists
|
|
19
|
-
if (this.plugins.has(name)) {
|
|
20
|
-
throw new PluginError(name, 'initialize', 'Plugin already registered');
|
|
21
|
-
}
|
|
22
|
-
// Validate dependencies
|
|
23
|
-
const missingDependencies = dependencies.filter(dep => !this.plugins.has(dep));
|
|
24
|
-
if (missingDependencies.length > 0) {
|
|
25
|
-
throw new PluginDependencyError(name, missingDependencies);
|
|
26
|
-
}
|
|
27
|
-
// Check for conflicts with enabled plugins
|
|
28
|
-
const activeConflicts = conflicts.filter(conflict => this.enabledPlugins.has(conflict));
|
|
29
|
-
if (activeConflicts.length > 0) {
|
|
30
|
-
throw new PluginConflictError(name, activeConflicts);
|
|
31
|
-
}
|
|
32
|
-
// Store plugin and configuration
|
|
33
|
-
this.plugins.set(name, plugin);
|
|
34
|
-
this.pluginConfigs.set(name, config);
|
|
35
|
-
this.logger.info(`Plugin '${name}' registered successfully`);
|
|
36
|
-
this.eventBus.emit('plugin:registered', { name, plugin });
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
const pluginName = factory({}).metadata.name;
|
|
40
|
-
this.logger.error(`Failed to register plugin '${pluginName}'`, error);
|
|
41
|
-
this.eventBus.emit('plugin:error', { name: pluginName, error: error });
|
|
42
|
-
throw error;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
// Unregister a plugin
|
|
46
|
-
async unregister(name) {
|
|
47
|
-
const plugin = this.plugins.get(name);
|
|
48
|
-
if (!plugin) {
|
|
49
|
-
throw new PluginError(name, 'destroy', 'Plugin not found');
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
// Disable plugin if enabled
|
|
53
|
-
if (this.enabledPlugins.has(name)) {
|
|
54
|
-
await this.disable(name);
|
|
55
|
-
}
|
|
56
|
-
// Remove from registry
|
|
57
|
-
this.plugins.delete(name);
|
|
58
|
-
this.pluginConfigs.delete(name);
|
|
59
|
-
this.logger.info(`Plugin '${name}' unregistered successfully`);
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
this.logger.error(`Failed to unregister plugin '${name}'`, error);
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// Get a plugin by name
|
|
67
|
-
get(name) {
|
|
68
|
-
return this.plugins.get(name);
|
|
69
|
-
}
|
|
70
|
-
// Get all plugins sorted by priority
|
|
71
|
-
getAll() {
|
|
72
|
-
return Array.from(this.plugins.values()).sort(this.sortByPriority);
|
|
73
|
-
}
|
|
74
|
-
// Check if plugin is enabled
|
|
75
|
-
isEnabled(name) {
|
|
76
|
-
return this.enabledPlugins.has(name);
|
|
77
|
-
}
|
|
78
|
-
// Enable a plugin
|
|
79
|
-
async enable(name) {
|
|
80
|
-
const plugin = this.plugins.get(name);
|
|
81
|
-
if (!plugin) {
|
|
82
|
-
throw new PluginError(name, 'activate', 'Plugin not found');
|
|
83
|
-
}
|
|
84
|
-
if (this.enabledPlugins.has(name)) {
|
|
85
|
-
this.logger.warn(`Plugin '${name}' is already enabled`);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
try {
|
|
89
|
-
const context = this.createPluginContext(name);
|
|
90
|
-
const config = this.pluginConfigs.get(name);
|
|
91
|
-
// Initialize plugin
|
|
92
|
-
await plugin.initialize(context, config);
|
|
93
|
-
// Activate plugin
|
|
94
|
-
await plugin.activate(context);
|
|
95
|
-
this.enabledPlugins.add(name);
|
|
96
|
-
this.logger.info(`Plugin '${name}' enabled successfully`);
|
|
97
|
-
this.eventBus.emit('plugin:enabled', { name, plugin });
|
|
98
|
-
}
|
|
99
|
-
catch (error) {
|
|
100
|
-
this.logger.error(`Failed to enable plugin '${name}'`, error);
|
|
101
|
-
this.eventBus.emit('plugin:error', { name, error: error });
|
|
102
|
-
throw error;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
// Disable a plugin
|
|
106
|
-
async disable(name) {
|
|
107
|
-
const plugin = this.plugins.get(name);
|
|
108
|
-
if (!plugin) {
|
|
109
|
-
throw new PluginError(name, 'deactivate', 'Plugin not found');
|
|
110
|
-
}
|
|
111
|
-
if (!this.enabledPlugins.has(name)) {
|
|
112
|
-
this.logger.warn(`Plugin '${name}' is already disabled`);
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
try {
|
|
116
|
-
const context = this.createPluginContext(name);
|
|
117
|
-
// Deactivate plugin
|
|
118
|
-
await plugin.deactivate(context);
|
|
119
|
-
// Destroy plugin resources
|
|
120
|
-
await plugin.destroy(context);
|
|
121
|
-
this.enabledPlugins.delete(name);
|
|
122
|
-
this.logger.info(`Plugin '${name}' disabled successfully`);
|
|
123
|
-
this.eventBus.emit('plugin:disabled', { name, plugin });
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
this.logger.error(`Failed to disable plugin '${name}'`, error);
|
|
127
|
-
this.eventBus.emit('plugin:error', { name, error: error });
|
|
128
|
-
throw error;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
// Configure a plugin
|
|
132
|
-
async configure(name, config) {
|
|
133
|
-
const plugin = this.plugins.get(name);
|
|
134
|
-
if (!plugin) {
|
|
135
|
-
throw new PluginError(name, 'initialize', 'Plugin not found');
|
|
136
|
-
}
|
|
137
|
-
try {
|
|
138
|
-
// Update stored configuration
|
|
139
|
-
this.pluginConfigs.set(name, { ...this.pluginConfigs.get(name), ...config });
|
|
140
|
-
// If plugin has configure method, call it
|
|
141
|
-
if (plugin.configure) {
|
|
142
|
-
await plugin.configure(config);
|
|
143
|
-
}
|
|
144
|
-
this.logger.info(`Plugin '${name}' configured successfully`);
|
|
145
|
-
this.eventBus.emit('plugin:configured', { name, config });
|
|
146
|
-
}
|
|
147
|
-
catch (error) {
|
|
148
|
-
this.logger.error(`Failed to configure plugin '${name}'`, error);
|
|
149
|
-
this.eventBus.emit('plugin:error', { name, error: error });
|
|
150
|
-
throw error;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// Enable multiple plugins with dependency resolution
|
|
154
|
-
async enablePlugins(names) {
|
|
155
|
-
const resolved = this.resolveDependencies(names);
|
|
156
|
-
for (const name of resolved) {
|
|
157
|
-
if (!this.enabledPlugins.has(name)) {
|
|
158
|
-
await this.enable(name);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
// Disable multiple plugins
|
|
163
|
-
async disablePlugins(names) {
|
|
164
|
-
// Disable in reverse order to handle dependencies
|
|
165
|
-
const reversed = [...names].reverse();
|
|
166
|
-
for (const name of reversed) {
|
|
167
|
-
if (this.enabledPlugins.has(name)) {
|
|
168
|
-
await this.disable(name);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
// Get enabled plugins
|
|
173
|
-
getEnabledPlugins() {
|
|
174
|
-
return Array.from(this.enabledPlugins)
|
|
175
|
-
.map(name => this.plugins.get(name))
|
|
176
|
-
.filter(Boolean)
|
|
177
|
-
.sort(this.sortByPriority);
|
|
178
|
-
}
|
|
179
|
-
// Health check for all enabled plugins
|
|
180
|
-
async healthCheck() {
|
|
181
|
-
const results = [];
|
|
182
|
-
for (const name of this.enabledPlugins) {
|
|
183
|
-
const plugin = this.plugins.get(name);
|
|
184
|
-
try {
|
|
185
|
-
const healthy = plugin.healthCheck ? await plugin.healthCheck() : true;
|
|
186
|
-
results.push({ name, healthy });
|
|
187
|
-
}
|
|
188
|
-
catch (error) {
|
|
189
|
-
results.push({ name, healthy: false, error: error });
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return results;
|
|
193
|
-
}
|
|
194
|
-
// Event handling
|
|
195
|
-
on(event, listener) {
|
|
196
|
-
this.eventBus.on(event, listener);
|
|
197
|
-
return () => this.eventBus.off(event, listener);
|
|
198
|
-
}
|
|
199
|
-
// Create plugin context (will be implemented when we have the full context)
|
|
200
|
-
createPluginContext(pluginName) {
|
|
201
|
-
// This will be implemented when we integrate with the media player
|
|
202
|
-
// For now, return a minimal context
|
|
203
|
-
return {
|
|
204
|
-
state: {},
|
|
205
|
-
controls: {},
|
|
206
|
-
plugins: this,
|
|
207
|
-
emit: (event, data) => this.eventBus.emit(event, data),
|
|
208
|
-
on: (event, handler) => {
|
|
209
|
-
this.eventBus.on(event, handler);
|
|
210
|
-
return () => this.eventBus.off(event, handler);
|
|
211
|
-
},
|
|
212
|
-
element: null,
|
|
213
|
-
logger: this.createPluginLogger(pluginName)
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
// Create plugin-specific logger
|
|
217
|
-
createPluginLogger(pluginName) {
|
|
218
|
-
return {
|
|
219
|
-
info: (message, data) => this.logger.info(`[${pluginName}] ${message}`, data),
|
|
220
|
-
warn: (message, data) => this.logger.warn(`[${pluginName}] ${message}`, data),
|
|
221
|
-
error: (message, data) => this.logger.error(`[${pluginName}] ${message}`, data),
|
|
222
|
-
debug: (message, data) => this.logger.debug(`[${pluginName}] ${message}`, data)
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
// Resolve plugin dependencies
|
|
226
|
-
resolveDependencies(names) {
|
|
227
|
-
const resolved = [];
|
|
228
|
-
const visiting = new Set();
|
|
229
|
-
const visit = (name) => {
|
|
230
|
-
if (resolved.includes(name))
|
|
231
|
-
return;
|
|
232
|
-
if (visiting.has(name)) {
|
|
233
|
-
throw new PluginError(name, 'initialize', 'Circular dependency detected');
|
|
234
|
-
}
|
|
235
|
-
visiting.add(name);
|
|
236
|
-
const plugin = this.plugins.get(name);
|
|
237
|
-
if (!plugin) {
|
|
238
|
-
throw new PluginError(name, 'initialize', 'Plugin not found');
|
|
239
|
-
}
|
|
240
|
-
// Visit dependencies first
|
|
241
|
-
for (const dep of plugin.metadata.dependencies || []) {
|
|
242
|
-
visit(dep);
|
|
243
|
-
}
|
|
244
|
-
visiting.delete(name);
|
|
245
|
-
resolved.push(name);
|
|
246
|
-
};
|
|
247
|
-
for (const name of names) {
|
|
248
|
-
visit(name);
|
|
249
|
-
}
|
|
250
|
-
return resolved;
|
|
251
|
-
}
|
|
252
|
-
// Sort plugins by priority
|
|
253
|
-
sortByPriority(a, b) {
|
|
254
|
-
const priorityOrder = {
|
|
255
|
-
high: 3,
|
|
256
|
-
medium: 2,
|
|
257
|
-
low: 1
|
|
258
|
-
};
|
|
259
|
-
return priorityOrder[b.metadata.priority] - priorityOrder[a.metadata.priority];
|
|
260
|
-
}
|
|
261
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// Plugin error types
|
|
2
|
-
export class PluginError extends Error {
|
|
3
|
-
pluginName;
|
|
4
|
-
phase;
|
|
5
|
-
originalError;
|
|
6
|
-
constructor(pluginName, phase, message, originalError) {
|
|
7
|
-
super(`Plugin '${pluginName}' failed during ${phase}: ${message}`);
|
|
8
|
-
this.pluginName = pluginName;
|
|
9
|
-
this.phase = phase;
|
|
10
|
-
this.originalError = originalError;
|
|
11
|
-
this.name = 'PluginError';
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
// Plugin dependency error
|
|
15
|
-
export class PluginDependencyError extends PluginError {
|
|
16
|
-
missingDependencies;
|
|
17
|
-
constructor(pluginName, missingDependencies) {
|
|
18
|
-
super(pluginName, 'initialize', `Missing dependencies: ${missingDependencies.join(', ')}`);
|
|
19
|
-
this.missingDependencies = missingDependencies;
|
|
20
|
-
this.name = 'PluginDependencyError';
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
// Plugin conflict error
|
|
24
|
-
export class PluginConflictError extends PluginError {
|
|
25
|
-
conflictingPlugins;
|
|
26
|
-
constructor(pluginName, conflictingPlugins) {
|
|
27
|
-
super(pluginName, 'activate', `Conflicts with active plugins: ${conflictingPlugins.join(', ')}`);
|
|
28
|
-
this.conflictingPlugins = conflictingPlugins;
|
|
29
|
-
this.name = 'PluginConflictError';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
// Simple console logger implementation
|
|
2
|
-
export class ConsolePluginLogger {
|
|
3
|
-
prefix;
|
|
4
|
-
constructor(prefix = '[Plugin]') {
|
|
5
|
-
this.prefix = prefix;
|
|
6
|
-
}
|
|
7
|
-
info(message, data) {
|
|
8
|
-
if (data) {
|
|
9
|
-
console.info(`${this.prefix} ${message}`, data);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
console.info(`${this.prefix} ${message}`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
warn(message, data) {
|
|
16
|
-
if (data) {
|
|
17
|
-
console.warn(`${this.prefix} ${message}`, data);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
console.warn(`${this.prefix} ${message}`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
error(message, data) {
|
|
24
|
-
if (data) {
|
|
25
|
-
console.error(`${this.prefix} ${message}`, data);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
console.error(`${this.prefix} ${message}`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
debug(message, data) {
|
|
32
|
-
if (process.env.NODE_ENV === 'development') {
|
|
33
|
-
if (data) {
|
|
34
|
-
console.debug(`${this.prefix} ${message}`, data);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
console.debug(`${this.prefix} ${message}`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
// Plugin validation utilities
|
|
43
|
-
export class PluginValidator {
|
|
44
|
-
static validateMetadata(plugin) {
|
|
45
|
-
const { metadata } = plugin;
|
|
46
|
-
if (!metadata.name || typeof metadata.name !== 'string') {
|
|
47
|
-
throw new Error('Plugin metadata must include a valid name');
|
|
48
|
-
}
|
|
49
|
-
if (!metadata.version || typeof metadata.version !== 'string') {
|
|
50
|
-
throw new Error('Plugin metadata must include a valid version');
|
|
51
|
-
}
|
|
52
|
-
if (!metadata.description || typeof metadata.description !== 'string') {
|
|
53
|
-
throw new Error('Plugin metadata must include a valid description');
|
|
54
|
-
}
|
|
55
|
-
if (!metadata.category) {
|
|
56
|
-
throw new Error('Plugin metadata must include a valid category');
|
|
57
|
-
}
|
|
58
|
-
if (!metadata.priority) {
|
|
59
|
-
throw new Error('Plugin metadata must include a valid priority');
|
|
60
|
-
}
|
|
61
|
-
return true;
|
|
62
|
-
}
|
|
63
|
-
static validateConfig(config, schema) {
|
|
64
|
-
if (!schema)
|
|
65
|
-
return true;
|
|
66
|
-
// Simple schema validation - could be enhanced with a proper schema validator
|
|
67
|
-
for (const [key, rules] of Object.entries(schema)) {
|
|
68
|
-
const value = config[key];
|
|
69
|
-
if (rules.required && (value === undefined || value === null)) {
|
|
70
|
-
throw new Error(`Configuration property '${key}' is required`);
|
|
71
|
-
}
|
|
72
|
-
if (value !== undefined && rules.type && typeof value !== rules.type) {
|
|
73
|
-
throw new Error(`Configuration property '${key}' must be of type '${rules.type}'`);
|
|
74
|
-
}
|
|
75
|
-
if (rules.enum && !rules.enum.includes(value)) {
|
|
76
|
-
throw new Error(`Configuration property '${key}' must be one of: ${rules.enum.join(', ')}`);
|
|
77
|
-
}
|
|
78
|
-
if (rules.min !== undefined && typeof value === 'number' && value < rules.min) {
|
|
79
|
-
throw new Error(`Configuration property '${key}' must be at least ${rules.min}`);
|
|
80
|
-
}
|
|
81
|
-
if (rules.max !== undefined && typeof value === 'number' && value > rules.max) {
|
|
82
|
-
throw new Error(`Configuration property '${key}' must be at most ${rules.max}`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// Plugin performance monitoring
|
|
89
|
-
export class PluginPerformanceMonitor {
|
|
90
|
-
metrics = new Map();
|
|
91
|
-
measure(pluginName, operation, fn) {
|
|
92
|
-
const key = `${pluginName}.${operation}`;
|
|
93
|
-
const startTime = performance.now();
|
|
94
|
-
const updateMetrics = () => {
|
|
95
|
-
const endTime = performance.now();
|
|
96
|
-
const duration = endTime - startTime;
|
|
97
|
-
const existing = this.metrics.get(key) || {
|
|
98
|
-
calls: 0,
|
|
99
|
-
totalTime: 0,
|
|
100
|
-
averageTime: 0,
|
|
101
|
-
lastCall: 0
|
|
102
|
-
};
|
|
103
|
-
existing.calls++;
|
|
104
|
-
existing.totalTime += duration;
|
|
105
|
-
existing.averageTime = existing.totalTime / existing.calls;
|
|
106
|
-
existing.lastCall = endTime;
|
|
107
|
-
this.metrics.set(key, existing);
|
|
108
|
-
};
|
|
109
|
-
const result = fn();
|
|
110
|
-
if (result instanceof Promise) {
|
|
111
|
-
return result.then((value) => {
|
|
112
|
-
updateMetrics();
|
|
113
|
-
return value;
|
|
114
|
-
}, (error) => {
|
|
115
|
-
updateMetrics();
|
|
116
|
-
throw error;
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
updateMetrics();
|
|
121
|
-
return result;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
getMetrics(pluginName) {
|
|
125
|
-
if (pluginName) {
|
|
126
|
-
const pluginMetrics = {};
|
|
127
|
-
for (const [key, value] of this.metrics.entries()) {
|
|
128
|
-
if (key.startsWith(`${pluginName}.`)) {
|
|
129
|
-
const operation = key.substring(pluginName.length + 1);
|
|
130
|
-
pluginMetrics[operation] = value;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return pluginMetrics;
|
|
134
|
-
}
|
|
135
|
-
return Object.fromEntries(this.metrics.entries());
|
|
136
|
-
}
|
|
137
|
-
reset(pluginName) {
|
|
138
|
-
if (pluginName) {
|
|
139
|
-
for (const key of this.metrics.keys()) {
|
|
140
|
-
if (key.startsWith(`${pluginName}.`)) {
|
|
141
|
-
this.metrics.delete(key);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
this.metrics.clear();
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
// Plugin development helpers
|
|
151
|
-
export const PluginDevelopmentHelpers = {
|
|
152
|
-
// Create a mock plugin context for testing
|
|
153
|
-
createMockContext() {
|
|
154
|
-
return {
|
|
155
|
-
state: {
|
|
156
|
-
isPlaying: false,
|
|
157
|
-
currentTime: 0,
|
|
158
|
-
duration: 0,
|
|
159
|
-
volume: 1,
|
|
160
|
-
isMuted: false,
|
|
161
|
-
isLoading: false,
|
|
162
|
-
error: null
|
|
163
|
-
},
|
|
164
|
-
controls: {
|
|
165
|
-
play: () => Promise.resolve(),
|
|
166
|
-
pause: () => Promise.resolve(),
|
|
167
|
-
seek: (time) => Promise.resolve(),
|
|
168
|
-
setVolume: (volume) => Promise.resolve(),
|
|
169
|
-
mute: () => Promise.resolve(),
|
|
170
|
-
unmute: () => Promise.resolve(),
|
|
171
|
-
toggleMute: () => Promise.resolve()
|
|
172
|
-
},
|
|
173
|
-
plugins: {
|
|
174
|
-
get: () => undefined,
|
|
175
|
-
getAll: () => [],
|
|
176
|
-
isEnabled: () => false
|
|
177
|
-
},
|
|
178
|
-
emit: () => { },
|
|
179
|
-
on: () => () => { },
|
|
180
|
-
element: null,
|
|
181
|
-
logger: new ConsolePluginLogger('[MockPlugin]')
|
|
182
|
-
};
|
|
183
|
-
},
|
|
184
|
-
// Create a test plugin for development
|
|
185
|
-
createTestPlugin(name, hooks = {}) {
|
|
186
|
-
return {
|
|
187
|
-
metadata: {
|
|
188
|
-
name,
|
|
189
|
-
version: '1.0.0',
|
|
190
|
-
description: `Test plugin: ${name}`,
|
|
191
|
-
category: 'ui',
|
|
192
|
-
priority: 'medium'
|
|
193
|
-
},
|
|
194
|
-
initialize: async () => { },
|
|
195
|
-
activate: async () => { },
|
|
196
|
-
deactivate: async () => { },
|
|
197
|
-
destroy: async () => { },
|
|
198
|
-
healthCheck: () => true,
|
|
199
|
-
...hooks
|
|
200
|
-
};
|
|
201
|
-
},
|
|
202
|
-
// Plugin timing utilities
|
|
203
|
-
time: {
|
|
204
|
-
async: async (label, fn) => {
|
|
205
|
-
console.time(label);
|
|
206
|
-
try {
|
|
207
|
-
const result = await fn();
|
|
208
|
-
console.timeEnd(label);
|
|
209
|
-
return result;
|
|
210
|
-
}
|
|
211
|
-
catch (error) {
|
|
212
|
-
console.timeEnd(label);
|
|
213
|
-
throw error;
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
sync: (label, fn) => {
|
|
217
|
-
console.time(label);
|
|
218
|
-
try {
|
|
219
|
-
const result = fn();
|
|
220
|
-
console.timeEnd(label);
|
|
221
|
-
return result;
|
|
222
|
-
}
|
|
223
|
-
catch (error) {
|
|
224
|
-
console.timeEnd(label);
|
|
225
|
-
throw error;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
// Plugin storage utilities for persistent data
|
|
231
|
-
export class PluginStorage {
|
|
232
|
-
prefix;
|
|
233
|
-
constructor(pluginName) {
|
|
234
|
-
this.prefix = `baroi-plugin-${pluginName}`;
|
|
235
|
-
}
|
|
236
|
-
get(key, defaultValue) {
|
|
237
|
-
try {
|
|
238
|
-
const item = localStorage.getItem(`${this.prefix}-${key}`);
|
|
239
|
-
return item ? JSON.parse(item) : defaultValue;
|
|
240
|
-
}
|
|
241
|
-
catch {
|
|
242
|
-
return defaultValue;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
set(key, value) {
|
|
246
|
-
try {
|
|
247
|
-
localStorage.setItem(`${this.prefix}-${key}`, JSON.stringify(value));
|
|
248
|
-
}
|
|
249
|
-
catch (error) {
|
|
250
|
-
console.warn(`Failed to store plugin data for key: ${key}`, error);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
remove(key) {
|
|
254
|
-
try {
|
|
255
|
-
localStorage.removeItem(`${this.prefix}-${key}`);
|
|
256
|
-
}
|
|
257
|
-
catch (error) {
|
|
258
|
-
console.warn(`Failed to remove plugin data for key: ${key}`, error);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
clear() {
|
|
262
|
-
try {
|
|
263
|
-
const keys = Object.keys(localStorage).filter(key => key.startsWith(`${this.prefix}-`));
|
|
264
|
-
keys.forEach(key => localStorage.removeItem(key));
|
|
265
|
-
}
|
|
266
|
-
catch (error) {
|
|
267
|
-
console.warn('Failed to clear plugin data', error);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
// Export default logger instance
|
|
272
|
-
export const defaultPluginLogger = new ConsolePluginLogger();
|
|
273
|
-
// Export default performance monitor instance
|
|
274
|
-
export const defaultPerformanceMonitor = new PluginPerformanceMonitor();
|