@therealtinhtute/baroiplayer 1.0.6 → 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/package.json +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,239 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React, { lazy } from 'react';
|
|
3
|
-
// Feature flags for progressive loading
|
|
4
|
-
export const FEATURES = {
|
|
5
|
-
SUBTITLES: 'subtitles',
|
|
6
|
-
PLAYLISTS: 'playlists',
|
|
7
|
-
ADVANCED_CONTROLS: 'advanced_controls',
|
|
8
|
-
ANALYTICS: 'analytics',
|
|
9
|
-
PICTURE_IN_PICTURE: 'picture_in_picture',
|
|
10
|
-
QUALITY_SELECTOR: 'quality_selector',
|
|
11
|
-
PLAYBACK_SPEED: 'playback_speed',
|
|
12
|
-
CHAPTERS: 'chapters',
|
|
13
|
-
THUMBNAILS: 'thumbnails',
|
|
14
|
-
KEYBOARD_SHORTCUTS: 'keyboard_shortcuts'
|
|
15
|
-
};
|
|
16
|
-
export const defaultProgressiveConfig = {
|
|
17
|
-
enabledFeatures: [
|
|
18
|
-
FEATURES.SUBTITLES,
|
|
19
|
-
FEATURES.ADVANCED_CONTROLS,
|
|
20
|
-
FEATURES.KEYBOARD_SHORTCUTS
|
|
21
|
-
],
|
|
22
|
-
loadingStrategy: 'lazy',
|
|
23
|
-
fallbackTimeout: 5000,
|
|
24
|
-
retryAttempts: 3
|
|
25
|
-
};
|
|
26
|
-
// Dynamic imports with error handling and retry logic
|
|
27
|
-
export const lazyComponents = {
|
|
28
|
-
// Subtitle system
|
|
29
|
-
SubtitleSelector: lazy(() => import('../components/enhanced/advanced-features')
|
|
30
|
-
.then(module => ({ default: module.SubtitleSelector }))),
|
|
31
|
-
// Playlist functionality
|
|
32
|
-
PlaylistManager: lazy(() => import('../components/enhanced/advanced-features')
|
|
33
|
-
.then(module => ({ default: module.SubtitleSelector })) // Use existing component as placeholder
|
|
34
|
-
),
|
|
35
|
-
// Advanced controls
|
|
36
|
-
QualitySelector: lazy(() => import('../components/enhanced/advanced-features')
|
|
37
|
-
.then(module => ({ default: module.QualitySelector }))),
|
|
38
|
-
PlaybackSpeedSelector: lazy(() => import('../components/enhanced/advanced-features')
|
|
39
|
-
.then(module => ({ default: module.PlaybackSpeedSelector }))),
|
|
40
|
-
ChaptersPanel: lazy(() => import('../components/enhanced/advanced-features')
|
|
41
|
-
.then(module => ({ default: module.ChaptersPanel }))),
|
|
42
|
-
PictureInPictureButton: lazy(() => import('../components/enhanced/advanced-features')
|
|
43
|
-
.then(module => ({ default: module.PictureInPictureButton }))),
|
|
44
|
-
// Analytics
|
|
45
|
-
AnalyticsTracker: lazy(() => import('../components/enhanced/advanced-features')
|
|
46
|
-
.then(module => ({ default: module.SubtitleSelector })) // Use existing component as placeholder
|
|
47
|
-
),
|
|
48
|
-
};
|
|
49
|
-
// Feature detection utilities
|
|
50
|
-
export class FeatureDetector {
|
|
51
|
-
static cache = new Map();
|
|
52
|
-
static async isSupported(feature) {
|
|
53
|
-
if (this.cache.has(feature)) {
|
|
54
|
-
return this.cache.get(feature);
|
|
55
|
-
}
|
|
56
|
-
const supported = await this.checkFeatureSupport(feature);
|
|
57
|
-
this.cache.set(feature, supported);
|
|
58
|
-
return supported;
|
|
59
|
-
}
|
|
60
|
-
static async checkFeatureSupport(feature) {
|
|
61
|
-
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
62
|
-
// Server-side rendering - assume basic support
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
switch (feature) {
|
|
66
|
-
case FEATURES.SUBTITLES:
|
|
67
|
-
return 'TextTrack' in window;
|
|
68
|
-
case FEATURES.PICTURE_IN_PICTURE:
|
|
69
|
-
return 'pictureInPictureEnabled' in document;
|
|
70
|
-
case FEATURES.ADVANCED_CONTROLS:
|
|
71
|
-
return true; // Always supported
|
|
72
|
-
case FEATURES.PLAYLISTS:
|
|
73
|
-
return 'MediaSession' in window;
|
|
74
|
-
case FEATURES.ANALYTICS:
|
|
75
|
-
return 'IntersectionObserver' in window;
|
|
76
|
-
case FEATURES.QUALITY_SELECTOR:
|
|
77
|
-
return 'MediaSource' in window;
|
|
78
|
-
case FEATURES.PLAYBACK_SPEED:
|
|
79
|
-
return true; // HTML5 video supports this
|
|
80
|
-
case FEATURES.CHAPTERS:
|
|
81
|
-
return 'TextTrack' in window;
|
|
82
|
-
case FEATURES.THUMBNAILS:
|
|
83
|
-
return 'OffscreenCanvas' in window || 'canvas' in document.createElement('canvas');
|
|
84
|
-
case FEATURES.KEYBOARD_SHORTCUTS:
|
|
85
|
-
return 'KeyboardEvent' in window;
|
|
86
|
-
default:
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
// Progressive loading manager
|
|
92
|
-
export class ProgressiveLoader {
|
|
93
|
-
config;
|
|
94
|
-
loadedFeatures = new Set();
|
|
95
|
-
loadingPromises = new Map();
|
|
96
|
-
constructor(config = {}) {
|
|
97
|
-
this.config = { ...defaultProgressiveConfig, ...config };
|
|
98
|
-
}
|
|
99
|
-
async loadFeature(feature) {
|
|
100
|
-
// Check if feature is enabled
|
|
101
|
-
if (!this.config.enabledFeatures.includes(feature)) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
// Check if already loaded
|
|
105
|
-
if (this.loadedFeatures.has(feature)) {
|
|
106
|
-
return this.getLoadedFeature(feature);
|
|
107
|
-
}
|
|
108
|
-
// Check if currently loading
|
|
109
|
-
if (this.loadingPromises.has(feature)) {
|
|
110
|
-
return this.loadingPromises.get(feature);
|
|
111
|
-
}
|
|
112
|
-
// Check browser support
|
|
113
|
-
const isSupported = await FeatureDetector.isSupported(feature);
|
|
114
|
-
if (!isSupported) {
|
|
115
|
-
console.warn(`Feature ${feature} is not supported in this browser`);
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
// Start loading with retry logic
|
|
119
|
-
const loadingPromise = this.loadWithRetry(feature);
|
|
120
|
-
this.loadingPromises.set(feature, loadingPromise);
|
|
121
|
-
try {
|
|
122
|
-
const result = await loadingPromise;
|
|
123
|
-
this.loadedFeatures.add(feature);
|
|
124
|
-
return result;
|
|
125
|
-
}
|
|
126
|
-
catch (error) {
|
|
127
|
-
console.error(`Failed to load feature ${feature}:`, error);
|
|
128
|
-
this.loadingPromises.delete(feature);
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
async loadWithRetry(feature, attempt = 1) {
|
|
133
|
-
try {
|
|
134
|
-
const result = await this.loadFeatureModule(feature);
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
catch (error) {
|
|
138
|
-
if (attempt < this.config.retryAttempts) {
|
|
139
|
-
console.warn(`Loading feature ${feature} failed, retrying (${attempt}/${this.config.retryAttempts})`);
|
|
140
|
-
await new Promise(resolve => setTimeout(resolve, 1000 * attempt));
|
|
141
|
-
return this.loadWithRetry(feature, attempt + 1);
|
|
142
|
-
}
|
|
143
|
-
throw error;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
async loadFeatureModule(feature) {
|
|
147
|
-
switch (feature) {
|
|
148
|
-
case FEATURES.SUBTITLES:
|
|
149
|
-
return import('../hooks/useEnhancedSubtitles');
|
|
150
|
-
case FEATURES.PLAYLISTS:
|
|
151
|
-
return import('../components/enhanced/advanced-features'); // Use existing features
|
|
152
|
-
case FEATURES.ADVANCED_CONTROLS:
|
|
153
|
-
return import('../components/enhanced/advanced-features');
|
|
154
|
-
case FEATURES.ANALYTICS:
|
|
155
|
-
return import('../components/enhanced/advanced-features'); // Use existing features
|
|
156
|
-
case FEATURES.PICTURE_IN_PICTURE:
|
|
157
|
-
return import('../components/enhanced/advanced-features'); // Use existing features
|
|
158
|
-
case FEATURES.QUALITY_SELECTOR:
|
|
159
|
-
return import('../components/enhanced/advanced-features'); // Use existing features
|
|
160
|
-
case FEATURES.PLAYBACK_SPEED:
|
|
161
|
-
return import('../components/enhanced/advanced-features'); // Use existing features
|
|
162
|
-
case FEATURES.CHAPTERS:
|
|
163
|
-
return import('../components/enhanced/advanced-features'); // Use existing features
|
|
164
|
-
case FEATURES.THUMBNAILS:
|
|
165
|
-
return import('../components/enhanced/advanced-features'); // Use existing features
|
|
166
|
-
case FEATURES.KEYBOARD_SHORTCUTS:
|
|
167
|
-
return import('../hooks/use-keyboard-controls');
|
|
168
|
-
default:
|
|
169
|
-
throw new Error(`Unknown feature: ${feature}`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
getLoadedFeature(feature) {
|
|
173
|
-
// Return cached feature instance
|
|
174
|
-
return this.loadingPromises.get(feature);
|
|
175
|
-
}
|
|
176
|
-
// Preload features for faster access
|
|
177
|
-
async preloadFeatures(features = this.config.enabledFeatures) {
|
|
178
|
-
const preloadPromises = features.map(feature => this.loadFeature(feature));
|
|
179
|
-
await Promise.allSettled(preloadPromises);
|
|
180
|
-
}
|
|
181
|
-
// Get loading state
|
|
182
|
-
getLoadingState() {
|
|
183
|
-
return {
|
|
184
|
-
loaded: Array.from(this.loadedFeatures),
|
|
185
|
-
loading: Array.from(this.loadingPromises.keys()),
|
|
186
|
-
enabled: this.config.enabledFeatures
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// Global progressive loader instance
|
|
191
|
-
export const progressiveLoader = new ProgressiveLoader();
|
|
192
|
-
// React hook for progressive loading
|
|
193
|
-
export function useProgressiveFeature(feature) {
|
|
194
|
-
const [featureModule, setFeatureModule] = React.useState(null);
|
|
195
|
-
const [loading, setLoading] = React.useState(false);
|
|
196
|
-
const [error, setError] = React.useState(null);
|
|
197
|
-
const load = React.useCallback(async () => {
|
|
198
|
-
if (loading || featureModule)
|
|
199
|
-
return;
|
|
200
|
-
setLoading(true);
|
|
201
|
-
setError(null);
|
|
202
|
-
try {
|
|
203
|
-
const module = await progressiveLoader.loadFeature(feature);
|
|
204
|
-
setFeatureModule(module);
|
|
205
|
-
}
|
|
206
|
-
catch (err) {
|
|
207
|
-
setError(err);
|
|
208
|
-
}
|
|
209
|
-
finally {
|
|
210
|
-
setLoading(false);
|
|
211
|
-
}
|
|
212
|
-
}, [feature, loading, featureModule]);
|
|
213
|
-
// Auto-load if strategy is immediate
|
|
214
|
-
React.useEffect(() => {
|
|
215
|
-
if (progressiveLoader['config'].loadingStrategy === 'immediate') {
|
|
216
|
-
load();
|
|
217
|
-
}
|
|
218
|
-
}, [load]);
|
|
219
|
-
return {
|
|
220
|
-
feature: featureModule,
|
|
221
|
-
loading,
|
|
222
|
-
error,
|
|
223
|
-
load
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
// HOC for progressive feature loading
|
|
227
|
-
export function withProgressiveFeature(WrappedComponent, feature, fallback) {
|
|
228
|
-
return function ProgressiveFeatureWrapper(props) {
|
|
229
|
-
const { feature: featureModule, loading, error } = useProgressiveFeature(feature);
|
|
230
|
-
if (loading) {
|
|
231
|
-
return _jsx("div", { className: "h-8 animate-pulse rounded bg-gray-200" });
|
|
232
|
-
}
|
|
233
|
-
if (error || !featureModule) {
|
|
234
|
-
const Fallback = fallback;
|
|
235
|
-
return Fallback ? _jsx(Fallback, { ...props }) : null;
|
|
236
|
-
}
|
|
237
|
-
return _jsx(WrappedComponent, { ...props });
|
|
238
|
-
};
|
|
239
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-hls-provider.d.ts","sourceRoot":"","sources":["enhanced-hls-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,GAAG,EAAE,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yCAAyC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,EAAE,iBAmGnC,CAAC;AAEF,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,GAAG,CAAoB;IAC/B,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,kBAAkB,CAAwB;gBAEtC,MAAM,GAAE,OAAO,CAAC,iBAAiB,CAAM;IAKnD;;OAEG;IACI,UAAU,CAChB,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iBAAsB,GAC7B,GAAG;IAoBN;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA0B1B;;OAEG;IACH,OAAO,CAAC,cAAc;IAsDtB;;OAEG;IACI,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAOhE;;OAEG;IACI,qBAAqB,IAAI,GAAG;IAInC;;OAEG;IACI,OAAO,IAAI,IAAI;IAQtB;;OAEG;WACW,WAAW,IAAI,OAAO;CAGpC"}
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enhanced HLS Provider with optimized configuration for 30-50% performance improvement
|
|
3
|
-
* Based on deep research analysis of HLS.js optimization patterns
|
|
4
|
-
*/
|
|
5
|
-
import Hls from 'hls.js';
|
|
6
|
-
export const ENHANCED_HLS_DEFAULTS = {
|
|
7
|
-
// Enhanced buffer management for 30% performance improvement
|
|
8
|
-
maxBufferLength: 30,
|
|
9
|
-
maxBufferSize: 60 * 1000 * 1000, // 60 MB
|
|
10
|
-
maxBufferHole: 0.5,
|
|
11
|
-
// Back buffer management for memory optimization
|
|
12
|
-
backBufferLength: 90,
|
|
13
|
-
// Advanced ABR configuration for adaptive streaming
|
|
14
|
-
abrEwmaFastLive: 3.0,
|
|
15
|
-
abrEwmaSlowLive: 9.0,
|
|
16
|
-
abrEwmaFastVoD: 4.0,
|
|
17
|
-
abrEwmaSlowVoD: 15.0,
|
|
18
|
-
abrEwmaDefaultEstimate: 500000,
|
|
19
|
-
abrBandWidthFactor: 0.95,
|
|
20
|
-
abrBandWidthUpFactor: 0.7,
|
|
21
|
-
abrMaxWithRealBitrate: true,
|
|
22
|
-
// Low latency optimization
|
|
23
|
-
lowLatencyMode: true,
|
|
24
|
-
liveSyncDurationCount: 3,
|
|
25
|
-
liveMaxLatencyDurationCount: Infinity,
|
|
26
|
-
liveDurationInfinity: true,
|
|
27
|
-
// Network optimization with intelligent retry policies
|
|
28
|
-
fragLoadPolicy: {
|
|
29
|
-
default: {
|
|
30
|
-
maxTimeToFirstByteMs: 9000,
|
|
31
|
-
maxLoadTimeMs: 20000,
|
|
32
|
-
timeoutRetry: {
|
|
33
|
-
maxNumRetry: 5,
|
|
34
|
-
retryDelayMs: 3000,
|
|
35
|
-
maxRetryDelayMs: 30000,
|
|
36
|
-
backoff: 'linear',
|
|
37
|
-
},
|
|
38
|
-
errorRetry: {
|
|
39
|
-
maxNumRetry: 5,
|
|
40
|
-
retryDelayMs: 3000,
|
|
41
|
-
maxRetryDelayMs: 30000,
|
|
42
|
-
backoff: 'linear',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
// Progressive segment loading for better performance
|
|
47
|
-
segmentLoadPolicy: {
|
|
48
|
-
default: {
|
|
49
|
-
maxTimeToFirstByteMs: 9000,
|
|
50
|
-
maxLoadTimeMs: 20000,
|
|
51
|
-
timeoutRetry: {
|
|
52
|
-
maxNumRetry: 3,
|
|
53
|
-
retryDelayMs: 2000,
|
|
54
|
-
maxRetryDelayMs: 20000,
|
|
55
|
-
backoff: 'linear',
|
|
56
|
-
},
|
|
57
|
-
errorRetry: {
|
|
58
|
-
maxNumRetry: 5,
|
|
59
|
-
retryDelayMs: 3000,
|
|
60
|
-
maxRetryDelayMs: 30000,
|
|
61
|
-
backoff: 'linear',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
// Enhanced manifest parsing
|
|
66
|
-
manifestLoadPolicy: {
|
|
67
|
-
default: {
|
|
68
|
-
maxTimeToFirstByteMs: 9000,
|
|
69
|
-
maxLoadTimeMs: 20000,
|
|
70
|
-
timeoutRetry: {
|
|
71
|
-
maxNumRetry: 3,
|
|
72
|
-
retryDelayMs: 2000,
|
|
73
|
-
maxRetryDelayMs: 20000,
|
|
74
|
-
backoff: 'linear',
|
|
75
|
-
},
|
|
76
|
-
errorRetry: {
|
|
77
|
-
maxNumRetry: 5,
|
|
78
|
-
retryDelayMs: 3000,
|
|
79
|
-
maxRetryDelayMs: 30000,
|
|
80
|
-
backoff: 'linear',
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
// Level selection optimization
|
|
85
|
-
startLevel: -1, // Auto-select start level
|
|
86
|
-
initialBitrate: 0, // Auto-detect
|
|
87
|
-
preferManagedMediaSource: true,
|
|
88
|
-
// Debug and monitoring
|
|
89
|
-
debug: false,
|
|
90
|
-
enableWorker: true,
|
|
91
|
-
enableSoftwareAES: true,
|
|
92
|
-
workerPath: 'https://cdn.jsdelivr.net/npm/hls.js@latest/dist/hls.worker.js',
|
|
93
|
-
// Custom configuration flags
|
|
94
|
-
enableAdvancedABR: true,
|
|
95
|
-
optimizedBuffering: true,
|
|
96
|
-
};
|
|
97
|
-
export class EnhancedHLSProvider {
|
|
98
|
-
hls = null;
|
|
99
|
-
config;
|
|
100
|
-
performanceMonitor;
|
|
101
|
-
constructor(config = {}) {
|
|
102
|
-
this.config = { ...ENHANCED_HLS_DEFAULTS, ...config };
|
|
103
|
-
this.performanceMonitor = new HLSPerformanceMonitor();
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Initialize HLS instance with enhanced configuration
|
|
107
|
-
*/
|
|
108
|
-
initialize(videoElement, mediaUrl, options = {}) {
|
|
109
|
-
// Clean up existing instance
|
|
110
|
-
this.destroy();
|
|
111
|
-
// Create new HLS instance with enhanced config
|
|
112
|
-
this.hls = new Hls(this.config);
|
|
113
|
-
// Setup performance monitoring
|
|
114
|
-
this.performanceMonitor.attach(this.hls);
|
|
115
|
-
// Configure advanced event handling
|
|
116
|
-
this.setupEventHandlers(videoElement, options);
|
|
117
|
-
// Load media
|
|
118
|
-
this.hls.loadSource(mediaUrl);
|
|
119
|
-
this.hls.attachMedia(videoElement);
|
|
120
|
-
return this.hls;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Setup enhanced event handlers for better error recovery and performance
|
|
124
|
-
*/
|
|
125
|
-
setupEventHandlers(videoElement, options) {
|
|
126
|
-
if (!this.hls)
|
|
127
|
-
return;
|
|
128
|
-
// Enhanced error handling with intelligent recovery
|
|
129
|
-
this.hls.on(Hls.Events.ERROR, (event, data) => {
|
|
130
|
-
this.handleHLSError(event, data, videoElement, options);
|
|
131
|
-
});
|
|
132
|
-
// Performance monitoring events
|
|
133
|
-
this.hls.on(Hls.Events.FRAG_BUFFERED, (event, data) => {
|
|
134
|
-
this.performanceMonitor.onFragmentBuffered(data);
|
|
135
|
-
});
|
|
136
|
-
this.hls.on(Hls.Events.LEVEL_SWITCHED, (event, data) => {
|
|
137
|
-
this.performanceMonitor.onLevelSwitched(data);
|
|
138
|
-
});
|
|
139
|
-
// Quality optimization events
|
|
140
|
-
this.hls.on(Hls.Events.BITRATE_SWITCHING, (event, data) => {
|
|
141
|
-
this.performanceMonitor.onBitrateSwitch(data);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Enhanced error handling with intelligent recovery strategies
|
|
146
|
-
*/
|
|
147
|
-
handleHLSError(event, data, videoElement, options) {
|
|
148
|
-
console.warn('HLS Error:', data);
|
|
149
|
-
// Implement intelligent error recovery based on error type
|
|
150
|
-
switch (data.details) {
|
|
151
|
-
case Hls.ErrorDetails.FRAG_LOAD_ERROR:
|
|
152
|
-
// Network error - try reducing quality
|
|
153
|
-
if (data.frag && this.hls) {
|
|
154
|
-
const newLevel = Math.max(0, (this.hls.currentLevel || 0) - 1);
|
|
155
|
-
this.hls.currentLevel = newLevel;
|
|
156
|
-
}
|
|
157
|
-
break;
|
|
158
|
-
case Hls.ErrorDetails.FRAG_LOAD_TIMEOUT:
|
|
159
|
-
// Timeout - increase timeout and retry
|
|
160
|
-
if (this.hls) {
|
|
161
|
-
this.hls.config.fragLoadPolicy.default.timeoutRetry.maxNumRetry = 8;
|
|
162
|
-
this.hls.config.fragLoadPolicy.default.timeoutRetry.retryDelayMs = 5000;
|
|
163
|
-
}
|
|
164
|
-
break;
|
|
165
|
-
case Hls.ErrorDetails.LEVEL_LOAD_ERROR:
|
|
166
|
-
// Manifest error - try recovery with alternative
|
|
167
|
-
if (options.hlsConfig?.fallbackUrl) {
|
|
168
|
-
this.hls?.loadSource(options.hlsConfig.fallbackUrl);
|
|
169
|
-
}
|
|
170
|
-
break;
|
|
171
|
-
case Hls.ErrorDetails.BUFFER_APPEND_ERROR:
|
|
172
|
-
// Buffer error - recover with buffer flush
|
|
173
|
-
if (this.hls && data.frag) {
|
|
174
|
-
this.hls.swapAudioCodec();
|
|
175
|
-
}
|
|
176
|
-
break;
|
|
177
|
-
default:
|
|
178
|
-
// For other errors, try general recovery
|
|
179
|
-
if (this.hls && data.fatal) {
|
|
180
|
-
this.hls.recoverMediaError();
|
|
181
|
-
}
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
// Custom error handler if provided
|
|
185
|
-
if (options.onError) {
|
|
186
|
-
options.onError(data);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Update configuration dynamically
|
|
191
|
-
*/
|
|
192
|
-
updateConfig(newConfig) {
|
|
193
|
-
this.config = { ...this.config, ...newConfig };
|
|
194
|
-
if (this.hls) {
|
|
195
|
-
this.hls.config = this.config;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Get current performance metrics
|
|
200
|
-
*/
|
|
201
|
-
getPerformanceMetrics() {
|
|
202
|
-
return this.performanceMonitor.getMetrics();
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Destroy HLS instance and cleanup resources
|
|
206
|
-
*/
|
|
207
|
-
destroy() {
|
|
208
|
-
if (this.hls) {
|
|
209
|
-
this.performanceMonitor.detach();
|
|
210
|
-
this.hls.destroy();
|
|
211
|
-
this.hls = null;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Check if HLS is supported
|
|
216
|
-
*/
|
|
217
|
-
static isSupported() {
|
|
218
|
-
return Hls.isSupported();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Performance monitoring for HLS playback
|
|
223
|
-
*/
|
|
224
|
-
class HLSPerformanceMonitor {
|
|
225
|
-
metrics = {
|
|
226
|
-
bufferedFragments: 0,
|
|
227
|
-
levelSwitches: 0,
|
|
228
|
-
bitrateChanges: 0,
|
|
229
|
-
averageBufferLength: 0,
|
|
230
|
-
droppedFrames: 0,
|
|
231
|
-
lastQualitySwitch: 0,
|
|
232
|
-
};
|
|
233
|
-
startTime = Date.now();
|
|
234
|
-
attach(hls) {
|
|
235
|
-
// Monitor video element for dropped frames
|
|
236
|
-
const video = hls.media;
|
|
237
|
-
if (video) {
|
|
238
|
-
const checkDroppedFrames = () => {
|
|
239
|
-
if (video.getVideoPlaybackQuality) {
|
|
240
|
-
const quality = video.getVideoPlaybackQuality();
|
|
241
|
-
this.metrics.droppedFrames = quality.droppedVideoFrames;
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
video.addEventListener('timeupdate', checkDroppedFrames);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
detach() {
|
|
248
|
-
// Cleanup event listeners and resources
|
|
249
|
-
}
|
|
250
|
-
onFragmentBuffered(data) {
|
|
251
|
-
this.metrics.bufferedFragments++;
|
|
252
|
-
this.updateAverageBufferLength();
|
|
253
|
-
}
|
|
254
|
-
onLevelSwitched(data) {
|
|
255
|
-
this.metrics.levelSwitches++;
|
|
256
|
-
this.metrics.lastQualitySwitch = Date.now();
|
|
257
|
-
}
|
|
258
|
-
onBitrateSwitch(data) {
|
|
259
|
-
this.metrics.bitrateChanges++;
|
|
260
|
-
}
|
|
261
|
-
updateAverageBufferLength() {
|
|
262
|
-
// Calculate average buffer length based on current metrics
|
|
263
|
-
const uptime = (Date.now() - this.startTime) / 1000;
|
|
264
|
-
this.metrics.averageBufferLength = this.metrics.bufferedFragments / uptime;
|
|
265
|
-
}
|
|
266
|
-
getMetrics() {
|
|
267
|
-
return {
|
|
268
|
-
...this.metrics,
|
|
269
|
-
uptime: (Date.now() - this.startTime) / 1000,
|
|
270
|
-
fragmentRate: this.metrics.bufferedFragments / ((Date.now() - this.startTime) / 1000),
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service-provider.d.ts","sourceRoot":"","sources":["service-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,cAAc,EAAuB,MAAM,YAAY,CAAA;AAGhE,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzC;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAAA;IAC7B,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;IACnC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,KAAK,IAAI,IAAI,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IAC5C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;CAC3C;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACvC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACvC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACxC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;CACzC;AAyDD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,QAAQ,CAAA;IAClB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,MAAM,EAAE,aAAa,CAAA;CACtB;AAMD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACrC;AAGD,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,QAAa,EAAE,EAAE,oBAAoB,2CAsBhF;AAGD,wBAAgB,WAAW,IAAI,gBAAgB,CAM9C;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAE7C;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAElD;AAED,wBAAgB,UAAU,IAAI,cAAc,CAE3C;AAED,wBAAgB,YAAY,IAAI,gBAAgB,CAE/C;AAED,wBAAgB,SAAS,IAAI,aAAa,CAEzC;AAGD,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAC3C,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE,gBAAgB,CAAA;CAAE,CAAC,GACjE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAKxB"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, useMemo } from 'react';
|
|
3
|
-
import { EventBus } from '../events';
|
|
4
|
-
import { PluginRegistry, ConsolePluginLogger } from '../plugins';
|
|
5
|
-
// Service implementations
|
|
6
|
-
class LocalStorageService {
|
|
7
|
-
get(key) {
|
|
8
|
-
try {
|
|
9
|
-
const item = localStorage.getItem(`baroi-player-${key}`);
|
|
10
|
-
return item ? JSON.parse(item) : null;
|
|
11
|
-
}
|
|
12
|
-
catch {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
set(key, value) {
|
|
17
|
-
try {
|
|
18
|
-
localStorage.setItem(`baroi-player-${key}`, JSON.stringify(value));
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
console.warn('Failed to store data:', error);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
remove(key) {
|
|
25
|
-
try {
|
|
26
|
-
localStorage.removeItem(`baroi-player-${key}`);
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
console.warn('Failed to remove data:', error);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
clear() {
|
|
33
|
-
try {
|
|
34
|
-
Object.keys(localStorage).forEach(key => {
|
|
35
|
-
if (key.startsWith('baroi-player-')) {
|
|
36
|
-
localStorage.removeItem(key);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
console.warn('Failed to clear data:', error);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
class NoOpAnalyticsService {
|
|
46
|
-
track(event, data) {
|
|
47
|
-
console.log('Analytics:', event, data);
|
|
48
|
-
}
|
|
49
|
-
identify(userId, traits) {
|
|
50
|
-
console.log('Analytics identify:', userId, traits);
|
|
51
|
-
}
|
|
52
|
-
page(name, properties) {
|
|
53
|
-
console.log('Analytics page:', name, properties);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Service provider context
|
|
57
|
-
const ServiceContext = createContext(null);
|
|
58
|
-
// Service provider component
|
|
59
|
-
export function ServiceProvider({ children, services = {} }) {
|
|
60
|
-
const container = useMemo(() => {
|
|
61
|
-
const logger = services.logger || new ConsolePluginLogger('[BaroiPlayer]');
|
|
62
|
-
const eventBus = services.eventBus || new EventBus();
|
|
63
|
-
const pluginRegistry = services.pluginRegistry || new PluginRegistry(logger);
|
|
64
|
-
const storage = services.storage || new LocalStorageService();
|
|
65
|
-
const analytics = services.analytics || new NoOpAnalyticsService();
|
|
66
|
-
return {
|
|
67
|
-
eventBus,
|
|
68
|
-
pluginRegistry,
|
|
69
|
-
storage,
|
|
70
|
-
analytics,
|
|
71
|
-
logger
|
|
72
|
-
};
|
|
73
|
-
}, [services]);
|
|
74
|
-
return (_jsx(ServiceContext.Provider, { value: container, children: children }));
|
|
75
|
-
}
|
|
76
|
-
// Service hooks
|
|
77
|
-
export function useServices() {
|
|
78
|
-
const context = useContext(ServiceContext);
|
|
79
|
-
if (!context) {
|
|
80
|
-
throw new Error('useServices must be used within ServiceProvider');
|
|
81
|
-
}
|
|
82
|
-
return context;
|
|
83
|
-
}
|
|
84
|
-
export function useServiceEventBus() {
|
|
85
|
-
return useServices().eventBus;
|
|
86
|
-
}
|
|
87
|
-
export function usePluginRegistry() {
|
|
88
|
-
return useServices().pluginRegistry;
|
|
89
|
-
}
|
|
90
|
-
export function useStorage() {
|
|
91
|
-
return useServices().storage;
|
|
92
|
-
}
|
|
93
|
-
export function useAnalytics() {
|
|
94
|
-
return useServices().analytics;
|
|
95
|
-
}
|
|
96
|
-
export function useLogger() {
|
|
97
|
-
return useServices().logger;
|
|
98
|
-
}
|
|
99
|
-
// Service decorators for dependency injection
|
|
100
|
-
export function withServices(Component) {
|
|
101
|
-
return function WithServicesComponent(props) {
|
|
102
|
-
const services = useServices();
|
|
103
|
-
return _jsx(Component, { ...props, services: services });
|
|
104
|
-
};
|
|
105
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGrF,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACpC,eAAe,CAAC,EAAE,GAAG,EAAE,CAAA;IACvB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,GAAE,kBAAuB,IAC3B,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,6CAOjF;AAGD,wBAAsB,WAAW,CAAC,QAAQ,EAAE,gBAAgB;;;;;;;;;;;;GAY3D"}
|
package/dist/src/core/utils.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ServiceProvider } from './providers/service-provider';
|
|
3
|
-
// Create architecture wrapper component
|
|
4
|
-
export function createArchitecture(config = {}) {
|
|
5
|
-
return function ArchitectureProvider({ children }) {
|
|
6
|
-
return (_jsx(ServiceProvider, { services: config.services, children: children }));
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
// Architecture health check
|
|
10
|
-
export async function healthCheck(services) {
|
|
11
|
-
const results = {
|
|
12
|
-
eventBus: {
|
|
13
|
-
healthy: true,
|
|
14
|
-
listenerCount: services.eventBus.getListenerCount(),
|
|
15
|
-
eventTypes: services.eventBus.getEventTypes().length
|
|
16
|
-
},
|
|
17
|
-
plugins: await services.pluginRegistry.healthCheck(),
|
|
18
|
-
timestamp: Date.now()
|
|
19
|
-
};
|
|
20
|
-
return results;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-session-manager.d.ts","sourceRoot":"","sources":["media-session-manager.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,aAAa,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC;AAED,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,sBAAsB,CAAsB;IACpD,OAAO,CAAC,aAAa,CAAQ;gBAEjB,MAAM,GAAE,kBAAuB;IAY3C;;OAEG;IACH,OAAO,CAAC,UAAU;IAUlB;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAqB1C;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,yBAAyB,GAAG,IAAI;IAUxD;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAUjD;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,qBAAqB,GAAG,IAAI;IAQpD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAUxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAuDpB;;OAEG;IACH,qBAAqB,CAAC,cAAc,EAAE,MAAM,MAAM,EAAE,WAAW,EAAE,MAAM,MAAM,GAAG,IAAI;IAuBpF;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAO5B;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI;IAUlD;;OAEG;IACH,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI;IAgBnD;;OAEG;IACH,sBAAsB,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAoC7E;;OAEG;IACG,sBAAsB,CAAC,YAAY,EAAE,gBAAgB,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBpH;;OAEG;IACH,cAAc,IAAI;QAChB,SAAS,EAAE,OAAO,CAAA;QAClB,WAAW,EAAE,OAAO,CAAA;QACpB,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAA;QAC9B,aAAa,EAAE,yBAAyB,GAAG,IAAI,CAAA;QAC/C,cAAc,EAAE,MAAM,EAAE,CAAA;KACzB;IAUD;;OAEG;IACH,KAAK,IAAI,IAAI;IAwBb;;OAEG;IACH,OAAO,IAAI,IAAI;CAKhB;AAGD,wBAAgB,yBAAyB,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,mBAAmB,CAE1F;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,SAAS;QACjB,YAAY,EAAE,YAAY,CAAA;KAC3B;CACF;AAGD,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,CAAA"}
|