@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,331 +0,0 @@
|
|
|
1
|
-
export class MediaSessionManager {
|
|
2
|
-
callbacks = {};
|
|
3
|
-
config;
|
|
4
|
-
positionUpdateInterval = null;
|
|
5
|
-
isInitialized = false;
|
|
6
|
-
constructor(config = {}) {
|
|
7
|
-
this.config = {
|
|
8
|
-
enableActions: ['play', 'pause', 'seekbackward', 'seekforward', 'seekto'],
|
|
9
|
-
skipBackwardTime: 10,
|
|
10
|
-
skipForwardTime: 10,
|
|
11
|
-
enablePositionTracking: true,
|
|
12
|
-
...config
|
|
13
|
-
};
|
|
14
|
-
this.initialize();
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Initialize Media Session API
|
|
18
|
-
*/
|
|
19
|
-
initialize() {
|
|
20
|
-
if (!this.isSupported()) {
|
|
21
|
-
console.warn('Media Session API is not supported');
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
this.setupActionHandlers();
|
|
25
|
-
this.isInitialized = true;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Check if Media Session API is supported
|
|
29
|
-
*/
|
|
30
|
-
isSupported() {
|
|
31
|
-
return 'mediaSession' in navigator;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Set media metadata
|
|
35
|
-
*/
|
|
36
|
-
setMetadata(metadata) {
|
|
37
|
-
if (!this.isInitialized)
|
|
38
|
-
return;
|
|
39
|
-
try {
|
|
40
|
-
const processedArtwork = metadata.artwork?.map(img => ({
|
|
41
|
-
src: img.src,
|
|
42
|
-
sizes: img.sizes || '512x512',
|
|
43
|
-
type: img.type || 'image/png'
|
|
44
|
-
}));
|
|
45
|
-
navigator.mediaSession.metadata = new MediaMetadata({
|
|
46
|
-
title: metadata.title || 'Unknown Title',
|
|
47
|
-
artist: metadata.artist || 'Unknown Artist',
|
|
48
|
-
album: metadata.album || 'Unknown Album',
|
|
49
|
-
artwork: processedArtwork || []
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
console.error('Failed to set media metadata:', error);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Set playback state
|
|
58
|
-
*/
|
|
59
|
-
setPlaybackState(state) {
|
|
60
|
-
if (!this.isInitialized)
|
|
61
|
-
return;
|
|
62
|
-
try {
|
|
63
|
-
navigator.mediaSession.playbackState = state;
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
console.error('Failed to set playback state:', error);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Set position state
|
|
71
|
-
*/
|
|
72
|
-
setPositionState(state) {
|
|
73
|
-
if (!this.isInitialized || !this.config.enablePositionTracking)
|
|
74
|
-
return;
|
|
75
|
-
try {
|
|
76
|
-
navigator.mediaSession.setPositionState(state);
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
console.error('Failed to set position state:', error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Register callbacks for media actions
|
|
84
|
-
*/
|
|
85
|
-
setCallbacks(callbacks) {
|
|
86
|
-
this.callbacks = { ...this.callbacks, ...callbacks };
|
|
87
|
-
if (this.isInitialized) {
|
|
88
|
-
this.updateActionHandlers();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Setup action handlers
|
|
93
|
-
*/
|
|
94
|
-
setupActionHandlers() {
|
|
95
|
-
const actions = this.config.enableActions || [];
|
|
96
|
-
actions.forEach(action => {
|
|
97
|
-
this.setActionHandler(action);
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Update action handlers with current callbacks
|
|
102
|
-
*/
|
|
103
|
-
updateActionHandlers() {
|
|
104
|
-
this.setupActionHandlers();
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Set individual action handler
|
|
108
|
-
*/
|
|
109
|
-
setActionHandler(action) {
|
|
110
|
-
try {
|
|
111
|
-
navigator.mediaSession.setActionHandler(action, (details) => {
|
|
112
|
-
this.handleAction(action, details);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
console.warn(`Failed to set handler for action: ${action}`, error);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Handle media session actions
|
|
121
|
-
*/
|
|
122
|
-
handleAction(action, details) {
|
|
123
|
-
switch (action) {
|
|
124
|
-
case 'play':
|
|
125
|
-
this.callbacks.onPlay?.();
|
|
126
|
-
break;
|
|
127
|
-
case 'pause':
|
|
128
|
-
this.callbacks.onPause?.();
|
|
129
|
-
break;
|
|
130
|
-
case 'seekbackward':
|
|
131
|
-
const backwardTime = details?.seekOffset || this.config.skipBackwardTime || 10;
|
|
132
|
-
this.callbacks.onSeekBackward?.(backwardTime);
|
|
133
|
-
break;
|
|
134
|
-
case 'seekforward':
|
|
135
|
-
const forwardTime = details?.seekOffset || this.config.skipForwardTime || 10;
|
|
136
|
-
this.callbacks.onSeekForward?.(forwardTime);
|
|
137
|
-
break;
|
|
138
|
-
case 'seekto':
|
|
139
|
-
if (details?.seekTime !== undefined) {
|
|
140
|
-
this.callbacks.onSeekTo?.(details.seekTime);
|
|
141
|
-
}
|
|
142
|
-
break;
|
|
143
|
-
case 'previoustrack':
|
|
144
|
-
this.callbacks.onPreviousTrack?.();
|
|
145
|
-
break;
|
|
146
|
-
case 'nexttrack':
|
|
147
|
-
this.callbacks.onNextTrack?.();
|
|
148
|
-
break;
|
|
149
|
-
case 'stop':
|
|
150
|
-
this.callbacks.onStop?.();
|
|
151
|
-
break;
|
|
152
|
-
case 'togglemicrophone':
|
|
153
|
-
this.callbacks.onToggleMicrophone?.();
|
|
154
|
-
break;
|
|
155
|
-
case 'togglecamera':
|
|
156
|
-
this.callbacks.onToggleCamera?.();
|
|
157
|
-
break;
|
|
158
|
-
case 'hangup':
|
|
159
|
-
this.callbacks.onHangup?.();
|
|
160
|
-
break;
|
|
161
|
-
default:
|
|
162
|
-
console.warn(`Unhandled media session action: ${action}`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Start automatic position tracking
|
|
167
|
-
*/
|
|
168
|
-
startPositionTracking(getCurrentTime, getDuration) {
|
|
169
|
-
if (!this.config.enablePositionTracking || this.positionUpdateInterval) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
this.positionUpdateInterval = window.setInterval(() => {
|
|
173
|
-
try {
|
|
174
|
-
const currentTime = getCurrentTime();
|
|
175
|
-
const duration = getDuration();
|
|
176
|
-
if (!isNaN(currentTime) && !isNaN(duration) && duration > 0) {
|
|
177
|
-
this.setPositionState({
|
|
178
|
-
duration,
|
|
179
|
-
position: currentTime,
|
|
180
|
-
playbackRate: 1.0
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
catch (error) {
|
|
185
|
-
console.error('Failed to update position state:', error);
|
|
186
|
-
}
|
|
187
|
-
}, 1000); // Update every second
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Stop automatic position tracking
|
|
191
|
-
*/
|
|
192
|
-
stopPositionTracking() {
|
|
193
|
-
if (this.positionUpdateInterval) {
|
|
194
|
-
clearInterval(this.positionUpdateInterval);
|
|
195
|
-
this.positionUpdateInterval = null;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Enable specific actions
|
|
200
|
-
*/
|
|
201
|
-
enableActions(actions) {
|
|
202
|
-
this.config.enableActions = [...(this.config.enableActions || []), ...actions];
|
|
203
|
-
if (this.isInitialized) {
|
|
204
|
-
actions.forEach(action => {
|
|
205
|
-
this.setActionHandler(action);
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Disable specific actions
|
|
211
|
-
*/
|
|
212
|
-
disableActions(actions) {
|
|
213
|
-
if (!this.isInitialized)
|
|
214
|
-
return;
|
|
215
|
-
actions.forEach(action => {
|
|
216
|
-
try {
|
|
217
|
-
navigator.mediaSession.setActionHandler(action, null);
|
|
218
|
-
}
|
|
219
|
-
catch (error) {
|
|
220
|
-
console.warn(`Failed to disable action: ${action}`, error);
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
this.config.enableActions = this.config.enableActions?.filter(action => !actions.includes(action));
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Create artwork from video thumbnail
|
|
227
|
-
*/
|
|
228
|
-
createArtworkFromVideo(videoElement) {
|
|
229
|
-
return new Promise((resolve) => {
|
|
230
|
-
try {
|
|
231
|
-
const canvas = document.createElement('canvas');
|
|
232
|
-
const ctx = canvas.getContext('2d');
|
|
233
|
-
if (!ctx || videoElement.videoWidth === 0 || videoElement.videoHeight === 0) {
|
|
234
|
-
resolve([]);
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
canvas.width = Math.min(videoElement.videoWidth, 512);
|
|
238
|
-
canvas.height = Math.min(videoElement.videoHeight, 512);
|
|
239
|
-
ctx.drawImage(videoElement, 0, 0, canvas.width, canvas.height);
|
|
240
|
-
canvas.toBlob((blob) => {
|
|
241
|
-
if (blob) {
|
|
242
|
-
const url = URL.createObjectURL(blob);
|
|
243
|
-
resolve([{
|
|
244
|
-
src: url,
|
|
245
|
-
sizes: `${canvas.width}x${canvas.height}`,
|
|
246
|
-
type: blob.type
|
|
247
|
-
}]);
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
resolve([]);
|
|
251
|
-
}
|
|
252
|
-
}, 'image/png');
|
|
253
|
-
}
|
|
254
|
-
catch (error) {
|
|
255
|
-
console.error('Failed to create artwork from video:', error);
|
|
256
|
-
resolve([]);
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Update metadata from media element
|
|
262
|
-
*/
|
|
263
|
-
async updateFromMediaElement(mediaElement, additionalInfo) {
|
|
264
|
-
const metadata = {
|
|
265
|
-
title: additionalInfo?.title || document.title || 'Media Player',
|
|
266
|
-
artist: additionalInfo?.artist || 'Unknown Artist',
|
|
267
|
-
album: additionalInfo?.album || 'Unknown Album',
|
|
268
|
-
artwork: additionalInfo?.artwork || []
|
|
269
|
-
};
|
|
270
|
-
// Try to extract artwork from video element
|
|
271
|
-
if (mediaElement instanceof HTMLVideoElement && metadata.artwork?.length === 0) {
|
|
272
|
-
try {
|
|
273
|
-
const videoArtwork = await this.createArtworkFromVideo(mediaElement);
|
|
274
|
-
metadata.artwork = videoArtwork;
|
|
275
|
-
}
|
|
276
|
-
catch (error) {
|
|
277
|
-
console.error('Failed to extract video artwork:', error);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
this.setMetadata(metadata);
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Get current session info
|
|
284
|
-
*/
|
|
285
|
-
getSessionInfo() {
|
|
286
|
-
return {
|
|
287
|
-
supported: this.isSupported(),
|
|
288
|
-
initialized: this.isInitialized,
|
|
289
|
-
metadata: this.isInitialized ? navigator.mediaSession.metadata : null,
|
|
290
|
-
playbackState: this.isInitialized ? navigator.mediaSession.playbackState : null,
|
|
291
|
-
enabledActions: this.config.enableActions || []
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Reset session
|
|
296
|
-
*/
|
|
297
|
-
reset() {
|
|
298
|
-
if (!this.isInitialized)
|
|
299
|
-
return;
|
|
300
|
-
try {
|
|
301
|
-
navigator.mediaSession.metadata = null;
|
|
302
|
-
navigator.mediaSession.playbackState = 'none';
|
|
303
|
-
this.stopPositionTracking();
|
|
304
|
-
const actions = this.config.enableActions || [];
|
|
305
|
-
actions.forEach(action => {
|
|
306
|
-
try {
|
|
307
|
-
navigator.mediaSession.setActionHandler(action, null);
|
|
308
|
-
}
|
|
309
|
-
catch (error) {
|
|
310
|
-
console.warn(`Failed to reset handler for action: ${action}`, error);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
this.callbacks = {};
|
|
314
|
-
}
|
|
315
|
-
catch (error) {
|
|
316
|
-
console.error('Failed to reset media session:', error);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Cleanup resources
|
|
321
|
-
*/
|
|
322
|
-
destroy() {
|
|
323
|
-
this.stopPositionTracking();
|
|
324
|
-
this.reset();
|
|
325
|
-
this.isInitialized = false;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
// Utility function to create a configured media session manager
|
|
329
|
-
export function createMediaSessionManager(config) {
|
|
330
|
-
return new MediaSessionManager(config);
|
|
331
|
-
}
|
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
export class EnhancedPiPManager {
|
|
2
|
-
videoElement = null;
|
|
3
|
-
pipWindow = null;
|
|
4
|
-
eventListeners = new Map();
|
|
5
|
-
isCurrentlyActive = false;
|
|
6
|
-
constructor() {
|
|
7
|
-
this.setupEventListeners();
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Check if Picture-in-Picture is supported
|
|
11
|
-
*/
|
|
12
|
-
isSupported() {
|
|
13
|
-
const capabilities = this.getCapabilities();
|
|
14
|
-
return capabilities.supported;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Get detailed PiP capabilities
|
|
18
|
-
*/
|
|
19
|
-
getCapabilities() {
|
|
20
|
-
const capabilities = {
|
|
21
|
-
supported: false,
|
|
22
|
-
documentPiP: false,
|
|
23
|
-
videoPiP: false
|
|
24
|
-
};
|
|
25
|
-
// Check for video Picture-in-Picture support
|
|
26
|
-
if ('pictureInPictureEnabled' in document && document.pictureInPictureEnabled) {
|
|
27
|
-
capabilities.videoPiP = true;
|
|
28
|
-
capabilities.supported = true;
|
|
29
|
-
}
|
|
30
|
-
// Check for Document Picture-in-Picture support (Chrome 111+)
|
|
31
|
-
if ('documentPictureInPicture' in window) {
|
|
32
|
-
capabilities.documentPiP = true;
|
|
33
|
-
capabilities.supported = true;
|
|
34
|
-
}
|
|
35
|
-
return capabilities;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Check if Picture-in-Picture is currently active
|
|
39
|
-
*/
|
|
40
|
-
isActive() {
|
|
41
|
-
return this.isCurrentlyActive;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Enter Picture-in-Picture mode
|
|
45
|
-
*/
|
|
46
|
-
async enter(element, options = {}) {
|
|
47
|
-
if (!this.isSupported()) {
|
|
48
|
-
throw new Error('Picture-in-Picture is not supported');
|
|
49
|
-
}
|
|
50
|
-
if (this.isCurrentlyActive) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const capabilities = this.getCapabilities();
|
|
54
|
-
// Try video PiP first if we have a video element
|
|
55
|
-
if (element && capabilities.videoPiP) {
|
|
56
|
-
await this.enterVideoPiP(element, options);
|
|
57
|
-
}
|
|
58
|
-
// Fallback to document PiP if available
|
|
59
|
-
else if (capabilities.documentPiP) {
|
|
60
|
-
await this.enterDocumentPiP(options);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
throw new Error('No suitable Picture-in-Picture method available');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Exit Picture-in-Picture mode
|
|
68
|
-
*/
|
|
69
|
-
async exit() {
|
|
70
|
-
if (!this.isCurrentlyActive) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
try {
|
|
74
|
-
if (document.pictureInPictureElement) {
|
|
75
|
-
await document.exitPictureInPicture();
|
|
76
|
-
}
|
|
77
|
-
if (this.pipWindow) {
|
|
78
|
-
this.pipWindow.close();
|
|
79
|
-
this.pipWindow = null;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (error) {
|
|
83
|
-
console.error('Failed to exit Picture-in-Picture:', error);
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Toggle Picture-in-Picture mode
|
|
89
|
-
*/
|
|
90
|
-
async toggle(element, options = {}) {
|
|
91
|
-
if (this.isCurrentlyActive) {
|
|
92
|
-
await this.exit();
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
await this.enter(element, options);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Add event listener
|
|
100
|
-
*/
|
|
101
|
-
addEventListener(event, callback) {
|
|
102
|
-
if (!this.eventListeners.has(event)) {
|
|
103
|
-
this.eventListeners.set(event, new Set());
|
|
104
|
-
}
|
|
105
|
-
this.eventListeners.get(event).add(callback);
|
|
106
|
-
return () => {
|
|
107
|
-
const listeners = this.eventListeners.get(event);
|
|
108
|
-
if (listeners) {
|
|
109
|
-
listeners.delete(callback);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Enter video Picture-in-Picture mode
|
|
115
|
-
*/
|
|
116
|
-
async enterVideoPiP(element, options) {
|
|
117
|
-
try {
|
|
118
|
-
this.videoElement = element;
|
|
119
|
-
// Request video Picture-in-Picture
|
|
120
|
-
await element.requestPictureInPicture();
|
|
121
|
-
this.isCurrentlyActive = true;
|
|
122
|
-
this.emit('enter', { type: 'video' });
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
console.error('Failed to enter video Picture-in-Picture:', error);
|
|
126
|
-
throw error;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Enter document Picture-in-Picture mode
|
|
131
|
-
*/
|
|
132
|
-
async enterDocumentPiP(options) {
|
|
133
|
-
if (!('documentPictureInPicture' in window)) {
|
|
134
|
-
throw new Error('Document Picture-in-Picture is not supported');
|
|
135
|
-
}
|
|
136
|
-
try {
|
|
137
|
-
const { width = 640, height = 360, disallowReturnToOpener = false } = options;
|
|
138
|
-
// @ts-ignore - documentPictureInPicture is experimental
|
|
139
|
-
this.pipWindow = await window.documentPictureInPicture.requestWindow({
|
|
140
|
-
width,
|
|
141
|
-
height,
|
|
142
|
-
disallowReturnToOpener
|
|
143
|
-
});
|
|
144
|
-
this.isCurrentlyActive = true;
|
|
145
|
-
this.emit('enter', { type: 'document', window: this.pipWindow });
|
|
146
|
-
// Set up window event listeners
|
|
147
|
-
this.pipWindow.addEventListener('unload', () => {
|
|
148
|
-
this.handleDocumentPiPClose();
|
|
149
|
-
});
|
|
150
|
-
this.pipWindow.addEventListener('pagehide', () => {
|
|
151
|
-
this.handleDocumentPiPClose();
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
catch (error) {
|
|
155
|
-
console.error('Failed to enter document Picture-in-Picture:', error);
|
|
156
|
-
throw error;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Setup global event listeners
|
|
161
|
-
*/
|
|
162
|
-
setupEventListeners() {
|
|
163
|
-
// Video PiP events
|
|
164
|
-
document.addEventListener('enterpictureinpicture', (event) => {
|
|
165
|
-
this.isCurrentlyActive = true;
|
|
166
|
-
this.emit('enter', { type: 'video', element: event.target });
|
|
167
|
-
});
|
|
168
|
-
document.addEventListener('leavepictureinpicture', (event) => {
|
|
169
|
-
this.isCurrentlyActive = false;
|
|
170
|
-
this.videoElement = null;
|
|
171
|
-
this.emit('exit', { type: 'video', element: event.target });
|
|
172
|
-
});
|
|
173
|
-
// Document PiP events (if supported)
|
|
174
|
-
if ('documentPictureInPicture' in window) {
|
|
175
|
-
// @ts-ignore - documentPictureInPicture is experimental
|
|
176
|
-
window.documentPictureInPicture.addEventListener('enter', (event) => {
|
|
177
|
-
this.isCurrentlyActive = true;
|
|
178
|
-
this.pipWindow = event.window;
|
|
179
|
-
this.emit('enter', { type: 'document', window: event.window });
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
// Handle visibility change (when user switches tabs)
|
|
183
|
-
document.addEventListener('visibilitychange', () => {
|
|
184
|
-
if (document.hidden && this.isCurrentlyActive) {
|
|
185
|
-
this.emit('backgrounded');
|
|
186
|
-
}
|
|
187
|
-
else if (!document.hidden && this.isCurrentlyActive) {
|
|
188
|
-
this.emit('foregrounded');
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Handle document PiP window close
|
|
194
|
-
*/
|
|
195
|
-
handleDocumentPiPClose() {
|
|
196
|
-
this.isCurrentlyActive = false;
|
|
197
|
-
this.pipWindow = null;
|
|
198
|
-
this.emit('exit', { type: 'document' });
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Emit events to listeners
|
|
202
|
-
*/
|
|
203
|
-
emit(event, data) {
|
|
204
|
-
const listeners = this.eventListeners.get(event);
|
|
205
|
-
if (listeners) {
|
|
206
|
-
listeners.forEach(callback => callback(data));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Create custom controls for PiP window
|
|
211
|
-
*/
|
|
212
|
-
createCustomControls(options = {}) {
|
|
213
|
-
const controlsContainer = document.createElement('div');
|
|
214
|
-
controlsContainer.className = 'pip-controls';
|
|
215
|
-
controlsContainer.style.cssText = `
|
|
216
|
-
position: fixed;
|
|
217
|
-
bottom: 10px;
|
|
218
|
-
left: 10px;
|
|
219
|
-
right: 10px;
|
|
220
|
-
background: rgba(0, 0, 0, 0.8);
|
|
221
|
-
border-radius: 8px;
|
|
222
|
-
padding: 10px;
|
|
223
|
-
display: flex;
|
|
224
|
-
align-items: center;
|
|
225
|
-
gap: 10px;
|
|
226
|
-
z-index: 1000;
|
|
227
|
-
`;
|
|
228
|
-
// Play/Pause button
|
|
229
|
-
const playPauseBtn = document.createElement('button');
|
|
230
|
-
playPauseBtn.innerHTML = '▶️';
|
|
231
|
-
playPauseBtn.style.cssText = `
|
|
232
|
-
background: none;
|
|
233
|
-
border: none;
|
|
234
|
-
color: white;
|
|
235
|
-
font-size: 16px;
|
|
236
|
-
cursor: pointer;
|
|
237
|
-
padding: 5px;
|
|
238
|
-
`;
|
|
239
|
-
playPauseBtn.onclick = () => {
|
|
240
|
-
const isPlaying = playPauseBtn.innerHTML === '⏸️';
|
|
241
|
-
if (isPlaying) {
|
|
242
|
-
options.onPause?.();
|
|
243
|
-
playPauseBtn.innerHTML = '▶️';
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
options.onPlay?.();
|
|
247
|
-
playPauseBtn.innerHTML = '⏸️';
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
// Progress bar
|
|
251
|
-
const progressContainer = document.createElement('div');
|
|
252
|
-
progressContainer.style.cssText = `
|
|
253
|
-
flex: 1;
|
|
254
|
-
height: 4px;
|
|
255
|
-
background: rgba(255, 255, 255, 0.3);
|
|
256
|
-
border-radius: 2px;
|
|
257
|
-
cursor: pointer;
|
|
258
|
-
`;
|
|
259
|
-
const progressBar = document.createElement('div');
|
|
260
|
-
progressBar.style.cssText = `
|
|
261
|
-
height: 100%;
|
|
262
|
-
background: #3b82f6;
|
|
263
|
-
border-radius: 2px;
|
|
264
|
-
width: 0%;
|
|
265
|
-
`;
|
|
266
|
-
progressContainer.appendChild(progressBar);
|
|
267
|
-
// Volume control
|
|
268
|
-
const volumeContainer = document.createElement('div');
|
|
269
|
-
volumeContainer.style.cssText = `
|
|
270
|
-
display: flex;
|
|
271
|
-
align-items: center;
|
|
272
|
-
gap: 5px;
|
|
273
|
-
`;
|
|
274
|
-
const volumeIcon = document.createElement('span');
|
|
275
|
-
volumeIcon.innerHTML = '🔊';
|
|
276
|
-
volumeIcon.style.cssText = `
|
|
277
|
-
font-size: 14px;
|
|
278
|
-
cursor: pointer;
|
|
279
|
-
`;
|
|
280
|
-
const volumeSlider = document.createElement('input');
|
|
281
|
-
volumeSlider.type = 'range';
|
|
282
|
-
volumeSlider.min = '0';
|
|
283
|
-
volumeSlider.max = '100';
|
|
284
|
-
volumeSlider.value = '100';
|
|
285
|
-
volumeSlider.style.cssText = `
|
|
286
|
-
width: 60px;
|
|
287
|
-
height: 4px;
|
|
288
|
-
`;
|
|
289
|
-
volumeSlider.oninput = () => {
|
|
290
|
-
const volume = parseInt(volumeSlider.value) / 100;
|
|
291
|
-
options.onVolumeChange?.(volume);
|
|
292
|
-
};
|
|
293
|
-
volumeContainer.appendChild(volumeIcon);
|
|
294
|
-
volumeContainer.appendChild(volumeSlider);
|
|
295
|
-
// Close button
|
|
296
|
-
const closeBtn = document.createElement('button');
|
|
297
|
-
closeBtn.innerHTML = '✕';
|
|
298
|
-
closeBtn.style.cssText = `
|
|
299
|
-
background: none;
|
|
300
|
-
border: none;
|
|
301
|
-
color: white;
|
|
302
|
-
font-size: 16px;
|
|
303
|
-
cursor: pointer;
|
|
304
|
-
padding: 5px;
|
|
305
|
-
`;
|
|
306
|
-
closeBtn.onclick = () => {
|
|
307
|
-
options.onClose?.();
|
|
308
|
-
this.exit();
|
|
309
|
-
};
|
|
310
|
-
// Assemble controls
|
|
311
|
-
controlsContainer.appendChild(playPauseBtn);
|
|
312
|
-
controlsContainer.appendChild(progressContainer);
|
|
313
|
-
controlsContainer.appendChild(volumeContainer);
|
|
314
|
-
controlsContainer.appendChild(closeBtn);
|
|
315
|
-
return controlsContainer;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Setup responsive sizing for PiP window
|
|
319
|
-
*/
|
|
320
|
-
setupResponsiveSizing(window, aspectRatio = 16 / 9) {
|
|
321
|
-
if (!window)
|
|
322
|
-
return;
|
|
323
|
-
const resizeWindow = () => {
|
|
324
|
-
const maxWidth = screen.width * 0.3; // 30% of screen width
|
|
325
|
-
const maxHeight = screen.height * 0.3; // 30% of screen height
|
|
326
|
-
let width = maxWidth;
|
|
327
|
-
let height = width / aspectRatio;
|
|
328
|
-
if (height > maxHeight) {
|
|
329
|
-
height = maxHeight;
|
|
330
|
-
width = height * aspectRatio;
|
|
331
|
-
}
|
|
332
|
-
window.resizeTo(Math.round(width), Math.round(height));
|
|
333
|
-
};
|
|
334
|
-
// Initial resize
|
|
335
|
-
resizeWindow();
|
|
336
|
-
// Handle screen orientation changes
|
|
337
|
-
if (screen.orientation) {
|
|
338
|
-
screen.orientation.addEventListener('change', resizeWindow);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Cleanup resources
|
|
343
|
-
*/
|
|
344
|
-
destroy() {
|
|
345
|
-
this.exit().catch(() => { });
|
|
346
|
-
this.eventListeners.clear();
|
|
347
|
-
this.videoElement = null;
|
|
348
|
-
this.pipWindow = null;
|
|
349
|
-
this.isCurrentlyActive = false;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
// Singleton instance
|
|
353
|
-
export const pipManager = new EnhancedPiPManager();
|