@hanifhan1f/vidstack-react 1.12.13 → 1.12.14
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/dev/chunks/vidstack-B-FM4-oZ.js +668 -0
- package/dev/chunks/vidstack-B92UncBI.js +61 -0
- package/dev/chunks/vidstack-BDiAEW1N.js +11691 -0
- package/dev/chunks/vidstack-BZIhWvGa.js +1371 -0
- package/dev/chunks/vidstack-Bfi_jCvb.js +476 -0
- package/dev/chunks/vidstack-CBF7iUqu.js +22 -0
- package/dev/chunks/vidstack-CFZ0rYJz.js +34 -0
- package/dev/chunks/vidstack-CM82l-7o.js +551 -0
- package/dev/chunks/vidstack-CvWDiSTs.js +84 -0
- package/dev/chunks/vidstack-CzU-uC5f.js +189 -0
- package/dev/chunks/vidstack-D-hQD1eE.js +9 -0
- package/dev/chunks/vidstack-D6_9yy0x.js +643 -0
- package/dev/chunks/vidstack-DJQOTrl6.js +180 -0
- package/dev/chunks/vidstack-DNbKNc4R.js +288 -0
- package/dev/chunks/vidstack-D_bWd66h.js +2023 -0
- package/dev/chunks/vidstack-Dm1xEU9Q.js +36 -0
- package/dev/chunks/vidstack-f6WXkmfP.js +375 -0
- package/dev/chunks/vidstack-krOAtKMi.js +34 -0
- package/dev/chunks/vidstack-lYFZKRUc.js +401 -0
- package/dev/player/vidstack-default-components.js +14 -0
- package/dev/player/vidstack-default-icons.js +88 -0
- package/dev/player/vidstack-default-layout.js +14 -0
- package/dev/player/vidstack-plyr-icons.js +62 -0
- package/dev/player/vidstack-plyr-layout.js +636 -0
- package/dev/player/vidstack-remotion.js +345 -0
- package/dev/vidstack.js +587 -0
- package/dom.d.ts +91 -0
- package/google-cast.d.ts +1422 -0
- package/icons.d.ts +5 -0
- package/index.d.ts +8 -0
- package/package.json +9 -60
- package/player/layouts/default.d.ts +11392 -0
- package/player/layouts/plyr.d.ts +5 -0
- package/player/remotion.d.ts +5 -0
- package/player/styles/base.css +153 -0
- package/player/styles/default/buffering.css +55 -0
- package/player/styles/default/buttons.css +175 -0
- package/player/styles/default/captions.css +181 -0
- package/player/styles/default/chapter-title.css +26 -0
- package/player/styles/default/controls.css +56 -0
- package/player/styles/default/gestures.css +19 -0
- package/player/styles/default/icons.css +6 -0
- package/player/styles/default/keyboard.css +148 -0
- package/player/styles/default/layouts/audio.css +417 -0
- package/player/styles/default/layouts/video.css +1082 -0
- package/player/styles/default/menus.css +959 -0
- package/player/styles/default/poster.css +52 -0
- package/player/styles/default/sliders.css +391 -0
- package/player/styles/default/theme.css +2461 -0
- package/player/styles/default/thumbnail.css +40 -0
- package/player/styles/default/time.css +45 -0
- package/player/styles/default/tooltips.css +141 -0
- package/player/styles/plyr/theme.css +1237 -0
- package/prod/chunks/vidstack-0Foyib2F.js +34 -0
- package/prod/chunks/vidstack-BbPEqH3g.js +11196 -0
- package/prod/chunks/vidstack-Bh7M8kL6.js +663 -0
- package/prod/chunks/vidstack-BlPINAXN.js +189 -0
- package/prod/chunks/vidstack-C5Rzkyfp.js +375 -0
- package/prod/chunks/vidstack-CBF7iUqu.js +22 -0
- package/prod/chunks/vidstack-CZNlvfmV.js +288 -0
- package/prod/chunks/vidstack-CZgUA94N.js +1979 -0
- package/prod/chunks/vidstack-D0XCUWbp.js +159 -0
- package/prod/chunks/vidstack-DTyDOhwS.js +504 -0
- package/prod/chunks/vidstack-DhC5F6c8.js +470 -0
- package/prod/chunks/vidstack-Dm1xEU9Q.js +36 -0
- package/prod/chunks/vidstack-Ma9rwtR0.js +386 -0
- package/prod/chunks/vidstack-WsodkLQg.js +1371 -0
- package/prod/chunks/vidstack-jIPoNqhj.js +545 -0
- package/prod/chunks/vidstack-krOAtKMi.js +34 -0
- package/prod/chunks/vidstack-vqp2QaHR.js +9 -0
- package/prod/chunks/vidstack-xo_SmgiV.js +84 -0
- package/prod/chunks/vidstack-xvxeRtaN.js +61 -0
- package/prod/player/vidstack-default-components.js +14 -0
- package/prod/player/vidstack-default-icons.js +88 -0
- package/prod/player/vidstack-default-layout.js +14 -0
- package/prod/player/vidstack-plyr-icons.js +62 -0
- package/prod/player/vidstack-plyr-layout.js +636 -0
- package/prod/player/vidstack-remotion.js +335 -0
- package/prod/vidstack-icons.js +435 -0
- package/prod/vidstack.js +648 -0
- package/server/chunks/vidstack-2zMSe4ym.js +1371 -0
- package/server/chunks/vidstack-BtqWstSj.js +375 -0
- package/server/chunks/vidstack-C-HdFsZi.js +84 -0
- package/server/chunks/vidstack-C4iWXMC-.js +545 -0
- package/server/chunks/vidstack-C5zFBMwg.js +386 -0
- package/server/chunks/vidstack-CBF7iUqu.js +22 -0
- package/server/chunks/vidstack-CEh38XpD.js +288 -0
- package/server/chunks/vidstack-CkMAeO-e.js +34 -0
- package/server/chunks/vidstack-Cm0qnRvu.js +11196 -0
- package/server/chunks/vidstack-CoGzBr_V.js +663 -0
- package/server/chunks/vidstack-CyFwkPiu.js +470 -0
- package/server/chunks/vidstack-D-hQD1eE.js +9 -0
- package/server/chunks/vidstack-D_bWd66h.js +2023 -0
- package/server/chunks/vidstack-Dm1xEU9Q.js +36 -0
- package/server/chunks/vidstack-DtQSvsQr.js +189 -0
- package/server/chunks/vidstack-jlaBqZq5.js +61 -0
- package/server/chunks/vidstack-krOAtKMi.js +34 -0
- package/server/chunks/vidstack-rWs25cS9.js +159 -0
- package/server/chunks/vidstack-uyCXITen.js +504 -0
- package/server/player/vidstack-default-components.js +14 -0
- package/server/player/vidstack-default-icons.js +88 -0
- package/server/player/vidstack-default-layout.js +14 -0
- package/server/player/vidstack-plyr-icons.js +62 -0
- package/server/player/vidstack-plyr-layout.js +636 -0
- package/server/player/vidstack-remotion.js +335 -0
- package/server/vidstack.js +648 -0
- package/tailwind.cjs +101 -0
- package/tailwind.d.cts +15 -0
- package/.templates/sandbox/document.css +0 -27
- package/.templates/sandbox/favicon-32x32.png +0 -0
- package/.templates/sandbox/index.html +0 -21
- package/.templates/sandbox/main.tsx +0 -12
- package/.templates/sandbox/player.css +0 -39
- package/.templates/sandbox/player.tsx +0 -121
- package/.templates/sandbox/tracks.ts +0 -23
- package/analyze.config.ts +0 -7
- package/build/build-icons.js +0 -62
- package/rollup.config.ts +0 -256
- package/src/components/announcer.tsx +0 -47
- package/src/components/layouts/default/audio-layout.tsx +0 -231
- package/src/components/layouts/default/context.ts +0 -28
- package/src/components/layouts/default/hooks.ts +0 -13
- package/src/components/layouts/default/icons.tsx +0 -225
- package/src/components/layouts/default/index.ts +0 -11
- package/src/components/layouts/default/media-layout.tsx +0 -259
- package/src/components/layouts/default/slots.tsx +0 -98
- package/src/components/layouts/default/ui/announcer.tsx +0 -22
- package/src/components/layouts/default/ui/buttons.tsx +0 -301
- package/src/components/layouts/default/ui/captions.tsx +0 -16
- package/src/components/layouts/default/ui/controls.tsx +0 -12
- package/src/components/layouts/default/ui/keyboard-display.tsx +0 -132
- package/src/components/layouts/default/ui/menus/accessibility-menu.tsx +0 -100
- package/src/components/layouts/default/ui/menus/audio-menu.tsx +0 -167
- package/src/components/layouts/default/ui/menus/captions-menu.tsx +0 -61
- package/src/components/layouts/default/ui/menus/chapters-menu.tsx +0 -132
- package/src/components/layouts/default/ui/menus/font-menu.tsx +0 -331
- package/src/components/layouts/default/ui/menus/items/menu-checkbox.tsx +0 -72
- package/src/components/layouts/default/ui/menus/items/menu-items.tsx +0 -135
- package/src/components/layouts/default/ui/menus/items/menu-slider.tsx +0 -92
- package/src/components/layouts/default/ui/menus/playback-menu.tsx +0 -232
- package/src/components/layouts/default/ui/menus/settings-menu.tsx +0 -114
- package/src/components/layouts/default/ui/menus/utils.ts +0 -12
- package/src/components/layouts/default/ui/sliders.tsx +0 -136
- package/src/components/layouts/default/ui/time.tsx +0 -73
- package/src/components/layouts/default/ui/title.tsx +0 -24
- package/src/components/layouts/default/ui/tooltip.tsx +0 -27
- package/src/components/layouts/default/ui.ts +0 -8
- package/src/components/layouts/default/video-layout.tsx +0 -344
- package/src/components/layouts/plyr/context.ts +0 -26
- package/src/components/layouts/plyr/icons/plyr-airplay.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-captions-off.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-captions-on.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-download.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-enter-fullscreen.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-exit-fullscreen.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-fast-forward.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-muted.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-pause.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-pip.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-play.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-restart.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-rewind.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-settings.js +0 -1
- package/src/components/layouts/plyr/icons/plyr-volume.js +0 -1
- package/src/components/layouts/plyr/icons.tsx +0 -71
- package/src/components/layouts/plyr/index.ts +0 -11
- package/src/components/layouts/plyr/layout.tsx +0 -1024
- package/src/components/layouts/plyr/props.ts +0 -104
- package/src/components/layouts/plyr/slots.tsx +0 -52
- package/src/components/layouts/remotion-ui.ts +0 -13
- package/src/components/layouts/utils.ts +0 -17
- package/src/components/player-callbacks.ts +0 -67
- package/src/components/player.tsx +0 -67
- package/src/components/primitives/instances.ts +0 -92
- package/src/components/primitives/nodes.tsx +0 -58
- package/src/components/primitives/slot.tsx +0 -132
- package/src/components/provider.tsx +0 -187
- package/src/components/text-track.tsx +0 -106
- package/src/components/ui/buttons/airplay-button.tsx +0 -53
- package/src/components/ui/buttons/caption-button.tsx +0 -55
- package/src/components/ui/buttons/fullscreen-button.tsx +0 -55
- package/src/components/ui/buttons/google-cast-button.tsx +0 -53
- package/src/components/ui/buttons/live-button.tsx +0 -56
- package/src/components/ui/buttons/mute-button.tsx +0 -60
- package/src/components/ui/buttons/pip-button.tsx +0 -54
- package/src/components/ui/buttons/play-button.tsx +0 -53
- package/src/components/ui/buttons/seek-button.tsx +0 -55
- package/src/components/ui/buttons/toggle-button.tsx +0 -51
- package/src/components/ui/caption.tsx +0 -70
- package/src/components/ui/captions.tsx +0 -41
- package/src/components/ui/chapter-title.tsx +0 -40
- package/src/components/ui/controls.tsx +0 -90
- package/src/components/ui/gesture.tsx +0 -43
- package/src/components/ui/menu.tsx +0 -251
- package/src/components/ui/poster.tsx +0 -101
- package/src/components/ui/radio-group.tsx +0 -88
- package/src/components/ui/sliders/audio-gain-slider.tsx +0 -55
- package/src/components/ui/sliders/quality-slider.tsx +0 -54
- package/src/components/ui/sliders/slider-callbacks.ts +0 -14
- package/src/components/ui/sliders/slider-value.tsx +0 -13
- package/src/components/ui/sliders/slider.tsx +0 -254
- package/src/components/ui/sliders/speed-slider.tsx +0 -54
- package/src/components/ui/sliders/time-slider.tsx +0 -379
- package/src/components/ui/sliders/volume-slider.tsx +0 -55
- package/src/components/ui/spinner.tsx +0 -105
- package/src/components/ui/thumbnail.tsx +0 -82
- package/src/components/ui/time.tsx +0 -77
- package/src/components/ui/title.tsx +0 -32
- package/src/components/ui/tooltip.tsx +0 -135
- package/src/globals.d.ts +0 -3
- package/src/hooks/create-text-track.ts +0 -22
- package/src/hooks/options/use-audio-gain-options.ts +0 -75
- package/src/hooks/options/use-audio-options.ts +0 -71
- package/src/hooks/options/use-caption-options.ts +0 -95
- package/src/hooks/options/use-chapter-options.ts +0 -97
- package/src/hooks/options/use-playback-rate-options.ts +0 -75
- package/src/hooks/options/use-video-quality-options.ts +0 -123
- package/src/hooks/use-active-text-cues.ts +0 -28
- package/src/hooks/use-active-text-track.ts +0 -19
- package/src/hooks/use-chapter-title.ts +0 -12
- package/src/hooks/use-dom.ts +0 -121
- package/src/hooks/use-media-context.ts +0 -6
- package/src/hooks/use-media-player.ts +0 -19
- package/src/hooks/use-media-provider.ts +0 -31
- package/src/hooks/use-media-remote.ts +0 -37
- package/src/hooks/use-media-state.ts +0 -58
- package/src/hooks/use-signals.ts +0 -24
- package/src/hooks/use-slider-preview.ts +0 -126
- package/src/hooks/use-slider-state.ts +0 -63
- package/src/hooks/use-state.ts +0 -47
- package/src/hooks/use-text-cues.ts +0 -33
- package/src/hooks/use-thumbnails.ts +0 -69
- package/src/icon.ts +0 -37
- package/src/icons.ts +0 -754
- package/src/index.ts +0 -181
- package/src/providers/remotion/index.ts +0 -10
- package/src/providers/remotion/layout-engine.ts +0 -123
- package/src/providers/remotion/loader.ts +0 -35
- package/src/providers/remotion/playback-engine.ts +0 -142
- package/src/providers/remotion/provider.tsx +0 -514
- package/src/providers/remotion/type-check.ts +0 -13
- package/src/providers/remotion/types.ts +0 -94
- package/src/providers/remotion/ui/context.tsx +0 -120
- package/src/providers/remotion/ui/error-boundary.tsx +0 -57
- package/src/providers/remotion/ui/poster.tsx +0 -33
- package/src/providers/remotion/ui/slider-thumbnail.tsx +0 -41
- package/src/providers/remotion/ui/thumbnail.tsx +0 -166
- package/src/providers/remotion/validate.ts +0 -220
- package/src/source.ts +0 -5
- package/src/utils.ts +0 -27
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -11
- package/types/react/src/components/announcer.d.ts +0 -16
- package/types/react/src/components/layouts/default/audio-layout.d.ts +0 -27
- package/types/react/src/components/layouts/default/context.d.ts +0 -14
- package/types/react/src/components/layouts/default/hooks.d.ts +0 -2
- package/types/react/src/components/layouts/default/icons.d.ts +0 -95
- package/types/react/src/components/layouts/default/index.d.ts +0 -5
- package/types/react/src/components/layouts/default/media-layout.d.ts +0 -133
- package/types/react/src/components/layouts/default/slots.d.ts +0 -22
- package/types/react/src/components/layouts/default/ui/announcer.d.ts +0 -6
- package/types/react/src/components/layouts/default/ui/buttons.d.ts +0 -54
- package/types/react/src/components/layouts/default/ui/captions.d.ts +0 -6
- package/types/react/src/components/layouts/default/ui/controls.d.ts +0 -6
- package/types/react/src/components/layouts/default/ui/keyboard-display.d.ts +0 -8
- package/types/react/src/components/layouts/default/ui/menus/accessibility-menu.d.ts +0 -10
- package/types/react/src/components/layouts/default/ui/menus/audio-menu.d.ts +0 -10
- package/types/react/src/components/layouts/default/ui/menus/captions-menu.d.ts +0 -10
- package/types/react/src/components/layouts/default/ui/menus/chapters-menu.d.ts +0 -7
- package/types/react/src/components/layouts/default/ui/menus/font-menu.d.ts +0 -6
- package/types/react/src/components/layouts/default/ui/menus/items/menu-checkbox.d.ts +0 -13
- package/types/react/src/components/layouts/default/ui/menus/items/menu-items.d.ts +0 -49
- package/types/react/src/components/layouts/default/ui/menus/items/menu-slider.d.ts +0 -26
- package/types/react/src/components/layouts/default/ui/menus/playback-menu.d.ts +0 -10
- package/types/react/src/components/layouts/default/ui/menus/settings-menu.d.ts +0 -15
- package/types/react/src/components/layouts/default/ui/menus/utils.d.ts +0 -1
- package/types/react/src/components/layouts/default/ui/sliders.d.ts +0 -24
- package/types/react/src/components/layouts/default/ui/time.d.ts +0 -30
- package/types/react/src/components/layouts/default/ui/title.d.ts +0 -6
- package/types/react/src/components/layouts/default/ui/tooltip.d.ts +0 -12
- package/types/react/src/components/layouts/default/ui.d.ts +0 -8
- package/types/react/src/components/layouts/default/video-layout.d.ts +0 -47
- package/types/react/src/components/layouts/plyr/context.d.ts +0 -12
- package/types/react/src/components/layouts/plyr/icons/plyr-airplay.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-captions-off.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-captions-on.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-download.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-enter-fullscreen.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-exit-fullscreen.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-fast-forward.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-muted.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-pause.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-pip.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-play.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-restart.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-rewind.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-settings.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons/plyr-volume.d.ts +0 -2
- package/types/react/src/components/layouts/plyr/icons.d.ts +0 -25
- package/types/react/src/components/layouts/plyr/index.d.ts +0 -6
- package/types/react/src/components/layouts/plyr/layout.d.ts +0 -17
- package/types/react/src/components/layouts/plyr/props.d.ts +0 -71
- package/types/react/src/components/layouts/plyr/slots.d.ts +0 -9
- package/types/react/src/components/layouts/remotion-ui.d.ts +0 -3
- package/types/react/src/components/layouts/utils.d.ts +0 -1
- package/types/react/src/components/player-callbacks.d.ts +0 -6
- package/types/react/src/components/player.d.ts +0 -32
- package/types/react/src/components/primitives/instances.d.ts +0 -83
- package/types/react/src/components/primitives/nodes.d.ts +0 -15
- package/types/react/src/components/primitives/slot.d.ts +0 -11
- package/types/react/src/components/provider.d.ts +0 -26
- package/types/react/src/components/text-track.d.ts +0 -100
- package/types/react/src/components/ui/buttons/airplay-button.d.ts +0 -22
- package/types/react/src/components/ui/buttons/caption-button.d.ts +0 -24
- package/types/react/src/components/ui/buttons/fullscreen-button.d.ts +0 -24
- package/types/react/src/components/ui/buttons/google-cast-button.d.ts +0 -22
- package/types/react/src/components/ui/buttons/live-button.d.ts +0 -26
- package/types/react/src/components/ui/buttons/mute-button.d.ts +0 -30
- package/types/react/src/components/ui/buttons/pip-button.d.ts +0 -24
- package/types/react/src/components/ui/buttons/play-button.d.ts +0 -23
- package/types/react/src/components/ui/buttons/seek-button.d.ts +0 -25
- package/types/react/src/components/ui/buttons/toggle-button.d.ts +0 -22
- package/types/react/src/components/ui/caption.d.ts +0 -11
- package/types/react/src/components/ui/captions.d.ts +0 -20
- package/types/react/src/components/ui/chapter-title.d.ts +0 -20
- package/types/react/src/components/ui/controls.d.ts +0 -40
- package/types/react/src/components/ui/gesture.d.ts +0 -20
- package/types/react/src/components/ui/menu.d.ts +0 -102
- package/types/react/src/components/ui/poster.d.ts +0 -25
- package/types/react/src/components/ui/radio-group.d.ts +0 -39
- package/types/react/src/components/ui/sliders/audio-gain-slider.d.ts +0 -29
- package/types/react/src/components/ui/sliders/quality-slider.d.ts +0 -28
- package/types/react/src/components/ui/sliders/slider-callbacks.d.ts +0 -6
- package/types/react/src/components/ui/sliders/slider-value.d.ts +0 -9
- package/types/react/src/components/ui/sliders/slider.d.ts +0 -134
- package/types/react/src/components/ui/sliders/speed-slider.d.ts +0 -28
- package/types/react/src/components/ui/sliders/time-slider.d.ts +0 -124
- package/types/react/src/components/ui/sliders/volume-slider.d.ts +0 -29
- package/types/react/src/components/ui/spinner.d.ts +0 -31
- package/types/react/src/components/ui/thumbnail.d.ts +0 -26
- package/types/react/src/components/ui/time.d.ts +0 -20
- package/types/react/src/components/ui/title.d.ts +0 -15
- package/types/react/src/components/ui/tooltip.d.ts +0 -63
- package/types/react/src/hooks/create-text-track.d.ts +0 -7
- package/types/react/src/hooks/options/use-audio-gain-options.d.ts +0 -22
- package/types/react/src/hooks/options/use-audio-options.d.ts +0 -17
- package/types/react/src/hooks/options/use-caption-options.d.ts +0 -24
- package/types/react/src/hooks/options/use-chapter-options.d.ts +0 -18
- package/types/react/src/hooks/options/use-playback-rate-options.d.ts +0 -22
- package/types/react/src/hooks/options/use-video-quality-options.d.ts +0 -35
- package/types/react/src/hooks/use-active-text-cues.d.ts +0 -6
- package/types/react/src/hooks/use-active-text-track.d.ts +0 -5
- package/types/react/src/hooks/use-chapter-title.d.ts +0 -4
- package/types/react/src/hooks/use-dom.d.ts +0 -9
- package/types/react/src/hooks/use-media-context.d.ts +0 -1
- package/types/react/src/hooks/use-media-player.d.ts +0 -7
- package/types/react/src/hooks/use-media-provider.d.ts +0 -7
- package/types/react/src/hooks/use-media-remote.d.ts +0 -12
- package/types/react/src/hooks/use-media-state.d.ts +0 -15
- package/types/react/src/hooks/use-signals.d.ts +0 -5
- package/types/react/src/hooks/use-slider-preview.d.ts +0 -27
- package/types/react/src/hooks/use-slider-state.d.ts +0 -16
- package/types/react/src/hooks/use-state.d.ts +0 -18
- package/types/react/src/hooks/use-text-cues.d.ts +0 -6
- package/types/react/src/hooks/use-thumbnails.d.ts +0 -16
- package/types/react/src/icon.d.ts +0 -17
- package/types/react/src/icons.d.ts +0 -215
- package/types/react/src/index.d.ts +0 -78
- package/types/react/src/providers/remotion/index.d.ts +0 -7
- package/types/react/src/providers/remotion/layout-engine.d.ts +0 -8
- package/types/react/src/providers/remotion/loader.d.ts +0 -9
- package/types/react/src/providers/remotion/playback-engine.d.ts +0 -11
- package/types/react/src/providers/remotion/provider.d.ts +0 -26
- package/types/react/src/providers/remotion/type-check.d.ts +0 -6
- package/types/react/src/providers/remotion/types.d.ts +0 -91
- package/types/react/src/providers/remotion/ui/context.d.ts +0 -17
- package/types/react/src/providers/remotion/ui/error-boundary.d.ts +0 -21
- package/types/react/src/providers/remotion/ui/poster.d.ts +0 -18
- package/types/react/src/providers/remotion/ui/slider-thumbnail.d.ts +0 -17
- package/types/react/src/providers/remotion/ui/thumbnail.d.ts +0 -32
- package/types/react/src/providers/remotion/validate.d.ts +0 -12
- package/types/react/src/source.d.ts +0 -3
- package/types/react/src/utils.d.ts +0 -3
- package/types/vidstack/src/core/api/src-types.d.ts +0 -50
- package/types/vidstack/src/utils/mime.d.ts +0 -15
- package/types/vidstack/src/utils/network.d.ts +0 -17
- package/types/vidstack/src/utils/support.d.ts +0 -72
- package/vite.config.ts +0 -23
- /package/{npm/analyze.json.d.ts → analyze.json.d.ts} +0 -0
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useMediaState, Primitive, IS_SERVER, isRemotionSrc, getDownloadFile } from '../chunks/vidstack-BbPEqH3g.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { effect, createDisposalBin, uppercaseFirstChar, isUndefined, signal, composeRefs, useSignal, isNumber, listenEvent, isString, isKeyboardEvent, isKeyboardClick } from '../chunks/vidstack-CZgUA94N.js';
|
|
6
|
+
import { useMediaContext, PlayButton, Root, Img, Gesture, AirPlayButton, CaptionButton, FullscreenButton, PIPButton, SeekButton, Root$1, Value, Preview, Thumbnail, LiveButton, Time, appendParamsToURL, Root$2, Button, Items, useAudioOptions, Root$3, Item, useCaptionOptions, MuteButton, Root$4 } from '../chunks/vidstack-Bh7M8kL6.js';
|
|
7
|
+
import { useMediaRemote, useVideoQualityOptions, usePlaybackRateOptions } from '../chunks/vidstack-BlPINAXN.js';
|
|
8
|
+
import { useLayoutName, useClassName } from '../chunks/vidstack-xo_SmgiV.js';
|
|
9
|
+
import { RemotionThumbnail, RemotionPoster, RemotionSliderThumbnail } from '../chunks/vidstack-vqp2QaHR.js';
|
|
10
|
+
export { plyrLayoutIcons } from './vidstack-plyr-icons.js';
|
|
11
|
+
import '@floating-ui/dom';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import '../chunks/vidstack-CBF7iUqu.js';
|
|
14
|
+
|
|
15
|
+
function usePlyrLayoutClasses(el, media) {
|
|
16
|
+
const {
|
|
17
|
+
canAirPlay,
|
|
18
|
+
canFullscreen,
|
|
19
|
+
canPictureInPicture,
|
|
20
|
+
controlsHidden,
|
|
21
|
+
currentTime,
|
|
22
|
+
fullscreen,
|
|
23
|
+
hasCaptions,
|
|
24
|
+
isAirPlayConnected,
|
|
25
|
+
paused,
|
|
26
|
+
pictureInPicture,
|
|
27
|
+
playing,
|
|
28
|
+
pointer,
|
|
29
|
+
poster,
|
|
30
|
+
textTrack,
|
|
31
|
+
viewType,
|
|
32
|
+
waiting
|
|
33
|
+
} = media.$state;
|
|
34
|
+
el.classList.add("plyr");
|
|
35
|
+
el.classList.add("plyr--full-ui");
|
|
36
|
+
const classes = {
|
|
37
|
+
"plyr--airplay-active": isAirPlayConnected,
|
|
38
|
+
"plyr--airplay-supported": canAirPlay,
|
|
39
|
+
"plyr--fullscreen-active": fullscreen,
|
|
40
|
+
"plyr--fullscreen-enabled": canFullscreen,
|
|
41
|
+
"plyr--hide-controls": controlsHidden,
|
|
42
|
+
"plyr--is-touch": () => pointer() === "coarse",
|
|
43
|
+
"plyr--loading": waiting,
|
|
44
|
+
"plyr--paused": paused,
|
|
45
|
+
"plyr--pip-active": pictureInPicture,
|
|
46
|
+
"plyr--pip-enabled": canPictureInPicture,
|
|
47
|
+
"plyr--playing": playing,
|
|
48
|
+
"plyr__poster-enabled": poster,
|
|
49
|
+
"plyr--stopped": () => paused() && currentTime() === 0,
|
|
50
|
+
"plyr--captions-active": textTrack,
|
|
51
|
+
"plyr--captions-enabled": hasCaptions
|
|
52
|
+
};
|
|
53
|
+
const disposal = createDisposalBin();
|
|
54
|
+
for (const token of Object.keys(classes)) {
|
|
55
|
+
disposal.add(effect(() => void el.classList.toggle(token, !!classes[token]())));
|
|
56
|
+
}
|
|
57
|
+
disposal.add(
|
|
58
|
+
effect(() => {
|
|
59
|
+
const token = `plyr--${viewType()}`;
|
|
60
|
+
el.classList.add(token);
|
|
61
|
+
return () => el.classList.remove(token);
|
|
62
|
+
}),
|
|
63
|
+
effect(() => {
|
|
64
|
+
const { $provider } = media, type = $provider()?.type, token = `plyr--${isHTMLProvider(type) ? "html5" : type}`;
|
|
65
|
+
el.classList.toggle(token, !!type);
|
|
66
|
+
return () => el.classList.remove(token);
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
return () => disposal.empty();
|
|
70
|
+
}
|
|
71
|
+
function isHTMLProvider(type) {
|
|
72
|
+
return type === "audio" || type === "video";
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const PlyrLayoutContext = React.createContext({});
|
|
76
|
+
PlyrLayoutContext.displayName = "PlyrLayoutContext";
|
|
77
|
+
function usePlyrLayoutContext() {
|
|
78
|
+
return React.useContext(PlyrLayoutContext);
|
|
79
|
+
}
|
|
80
|
+
function usePlyrLayoutWord(word) {
|
|
81
|
+
const { translations } = usePlyrLayoutContext();
|
|
82
|
+
return i18n(translations, word);
|
|
83
|
+
}
|
|
84
|
+
function i18n(translations, word) {
|
|
85
|
+
return translations?.[word] ?? word;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const defaultPlyrLayoutProps = {
|
|
89
|
+
clickToPlay: true,
|
|
90
|
+
clickToFullscreen: true,
|
|
91
|
+
controls: [
|
|
92
|
+
"play-large",
|
|
93
|
+
"play",
|
|
94
|
+
"progress",
|
|
95
|
+
"current-time",
|
|
96
|
+
"mute+volume",
|
|
97
|
+
"captions",
|
|
98
|
+
"settings",
|
|
99
|
+
"pip",
|
|
100
|
+
"airplay",
|
|
101
|
+
"fullscreen"
|
|
102
|
+
],
|
|
103
|
+
displayDuration: false,
|
|
104
|
+
download: null,
|
|
105
|
+
markers: null,
|
|
106
|
+
invertTime: true,
|
|
107
|
+
thumbnails: null,
|
|
108
|
+
toggleTime: true,
|
|
109
|
+
translations: null,
|
|
110
|
+
seekTime: 10,
|
|
111
|
+
speed: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 4]
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
function slot(name, defaultValue) {
|
|
115
|
+
const { slots } = usePlyrLayoutContext(), slot2 = slots?.[name], capitalizedName = uppercaseFirstChar(name);
|
|
116
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, slots?.[`before${capitalizedName}`], isUndefined(slot2) ? defaultValue : slot2, slots?.[`after${capitalizedName}`]);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const PlyrLayout = React.forwardRef(
|
|
120
|
+
(userProps, forwardRef) => {
|
|
121
|
+
const {
|
|
122
|
+
clickToPlay,
|
|
123
|
+
clickToFullscreen,
|
|
124
|
+
controls,
|
|
125
|
+
displayDuration,
|
|
126
|
+
download,
|
|
127
|
+
markers,
|
|
128
|
+
invertTime,
|
|
129
|
+
thumbnails,
|
|
130
|
+
toggleTime,
|
|
131
|
+
translations,
|
|
132
|
+
seekTime,
|
|
133
|
+
speed,
|
|
134
|
+
icons,
|
|
135
|
+
slots,
|
|
136
|
+
posterFrame,
|
|
137
|
+
className,
|
|
138
|
+
...elProps
|
|
139
|
+
} = { ...defaultPlyrLayoutProps, ...userProps }, [el, setEl] = React.useState(null), media = useMediaContext(), previewTime = React.useMemo(() => signal(0), []), $viewType = useMediaState("viewType");
|
|
140
|
+
useLayoutName("plyr");
|
|
141
|
+
useClassName(el, className);
|
|
142
|
+
React.useEffect(() => {
|
|
143
|
+
if (!el || !media) return;
|
|
144
|
+
return usePlyrLayoutClasses(el, media);
|
|
145
|
+
}, [el, media]);
|
|
146
|
+
return /* @__PURE__ */ React.createElement(
|
|
147
|
+
PlyrLayoutContext.Provider,
|
|
148
|
+
{
|
|
149
|
+
value: {
|
|
150
|
+
clickToPlay,
|
|
151
|
+
clickToFullscreen,
|
|
152
|
+
controls,
|
|
153
|
+
displayDuration,
|
|
154
|
+
download,
|
|
155
|
+
markers,
|
|
156
|
+
invertTime,
|
|
157
|
+
thumbnails,
|
|
158
|
+
toggleTime,
|
|
159
|
+
translations,
|
|
160
|
+
seekTime,
|
|
161
|
+
speed,
|
|
162
|
+
previewTime,
|
|
163
|
+
icons,
|
|
164
|
+
slots,
|
|
165
|
+
posterFrame
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
/* @__PURE__ */ React.createElement(
|
|
169
|
+
Primitive.div,
|
|
170
|
+
{
|
|
171
|
+
...elProps,
|
|
172
|
+
className: IS_SERVER ? `plyr plyr--full-ui plyr--${$viewType} ${className || ""}` : void 0,
|
|
173
|
+
ref: composeRefs(setEl, forwardRef)
|
|
174
|
+
},
|
|
175
|
+
$viewType === "audio" ? /* @__PURE__ */ React.createElement(PlyrAudioLayout, null) : $viewType === "video" ? /* @__PURE__ */ React.createElement(PlyrVideoLayout, null) : null
|
|
176
|
+
)
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
PlyrLayout.displayName = "PlyrLayout";
|
|
181
|
+
function PlyrAudioLayout() {
|
|
182
|
+
return PlyrAudioControls();
|
|
183
|
+
}
|
|
184
|
+
PlyrAudioLayout.displayName = "PlyrAudioLayout";
|
|
185
|
+
function PlyrVideoLayout() {
|
|
186
|
+
const media = useMediaContext(), { controls } = usePlyrLayoutContext(), { load } = media.$props, { canLoad } = media.$state, $load = useSignal(load), $canLoad = useSignal(canLoad);
|
|
187
|
+
if ($load === "play" && !$canLoad) {
|
|
188
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PlyrPlayLargeButton, null), /* @__PURE__ */ React.createElement(PlyrPoster, null));
|
|
189
|
+
}
|
|
190
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, controls.includes("play-large") ? /* @__PURE__ */ React.createElement(PlyrPlayLargeButton, null) : null, /* @__PURE__ */ React.createElement(PlyrPreviewScrubbing, null), /* @__PURE__ */ React.createElement(PlyrPoster, null), /* @__PURE__ */ React.createElement(PlyrVideoControls, null), /* @__PURE__ */ React.createElement(PlyrGestures, null), /* @__PURE__ */ React.createElement(PlyrCaptions, null));
|
|
191
|
+
}
|
|
192
|
+
PlyrVideoLayout.displayName = "PlyrVideoLayout";
|
|
193
|
+
function PlyrPlayLargeButton() {
|
|
194
|
+
const { translations, icons: Icons } = usePlyrLayoutContext(), $title = useMediaState("title"), label = `${i18n(translations, "Play")} ${$title}`;
|
|
195
|
+
return slot(
|
|
196
|
+
"playLargeButton",
|
|
197
|
+
/* @__PURE__ */ React.createElement(
|
|
198
|
+
PlayButton,
|
|
199
|
+
{
|
|
200
|
+
className: "plyr__control plyr__control--overlaid",
|
|
201
|
+
"aria-label": label,
|
|
202
|
+
"data-plyr": "play"
|
|
203
|
+
},
|
|
204
|
+
/* @__PURE__ */ React.createElement(Icons.Play, null)
|
|
205
|
+
)
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
PlyrPlayLargeButton.displayName = "PlyrPlayLargeButton";
|
|
209
|
+
function PlyrPreviewScrubbing() {
|
|
210
|
+
const $src = useMediaState("source"), { thumbnails, previewTime } = usePlyrLayoutContext(), $previewTime = useSignal(previewTime), $RemotionThumbnail = useSignal(RemotionThumbnail), $hasRemotionThumbnail = $RemotionThumbnail && isRemotionSrc($src);
|
|
211
|
+
return $hasRemotionThumbnail ? /* @__PURE__ */ React.createElement($RemotionThumbnail, { className: "plyr__preview-scrubbing", frame: $previewTime * $src.fps }) : /* @__PURE__ */ React.createElement(Root, { src: thumbnails, className: "plyr__preview-scrubbing", time: $previewTime }, /* @__PURE__ */ React.createElement(Img, null));
|
|
212
|
+
}
|
|
213
|
+
PlyrPreviewScrubbing.displayName = "PlyrPreviewScrubbing";
|
|
214
|
+
function PlyrPoster() {
|
|
215
|
+
const $src = useMediaState("source"), $poster = useMediaState("poster"), { posterFrame } = usePlyrLayoutContext(), $RemotionPoster = useSignal(RemotionPoster), $hasRemotionPoster = $RemotionPoster && isRemotionSrc($src) && isNumber(posterFrame);
|
|
216
|
+
return slot(
|
|
217
|
+
"poster",
|
|
218
|
+
$hasRemotionPoster ? /* @__PURE__ */ React.createElement($RemotionPoster, { frame: posterFrame, className: "plyr__poster" }) : /* @__PURE__ */ React.createElement("div", { className: "plyr__poster", style: { backgroundImage: `url("${$poster}")` } })
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
PlyrPoster.displayName = "PlyrPoster";
|
|
222
|
+
const noAudioControl = /* @__PURE__ */ new Set(["captions", "pip", "airplay", "fullscreen"]);
|
|
223
|
+
function PlyrAudioControls() {
|
|
224
|
+
const { controls } = usePlyrLayoutContext();
|
|
225
|
+
return /* @__PURE__ */ React.createElement("div", { className: "plyr__controls" }, controls.filter((type) => !noAudioControl.has(type)).map((type, i) => {
|
|
226
|
+
const Control = getPlyrControl(type);
|
|
227
|
+
return Control ? React.createElement(Control, { key: i }) : null;
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
PlyrAudioControls.displayName = "PlyrAudioControls";
|
|
231
|
+
function PlyrVideoControls() {
|
|
232
|
+
const { controls } = usePlyrLayoutContext();
|
|
233
|
+
return /* @__PURE__ */ React.createElement("div", { className: "plyr__controls" }, controls.map((type, i) => {
|
|
234
|
+
const Control = getPlyrControl(type);
|
|
235
|
+
return Control ? React.createElement(Control, { key: i }) : null;
|
|
236
|
+
}));
|
|
237
|
+
}
|
|
238
|
+
PlyrVideoControls.displayName = "PlyrVideoControls";
|
|
239
|
+
function getPlyrControl(type) {
|
|
240
|
+
switch (type) {
|
|
241
|
+
case "airplay":
|
|
242
|
+
return PlyrAirPlayButton;
|
|
243
|
+
case "captions":
|
|
244
|
+
return PlyrCaptionsButton;
|
|
245
|
+
case "current-time":
|
|
246
|
+
return PlyrCurrentTime;
|
|
247
|
+
case "download":
|
|
248
|
+
return PlyrDownloadButton;
|
|
249
|
+
case "duration":
|
|
250
|
+
return PlyrDuration;
|
|
251
|
+
case "fast-forward":
|
|
252
|
+
return PlyrFastForwardButton;
|
|
253
|
+
case "fullscreen":
|
|
254
|
+
return PlyrFullscreenButton;
|
|
255
|
+
case "mute":
|
|
256
|
+
case "volume":
|
|
257
|
+
case "mute+volume":
|
|
258
|
+
return () => PlyrVolume({ type });
|
|
259
|
+
case "pip":
|
|
260
|
+
return PlyrPIPButton;
|
|
261
|
+
case "play":
|
|
262
|
+
return PlyrPlayButton;
|
|
263
|
+
case "progress":
|
|
264
|
+
return PlyrTimeSlider;
|
|
265
|
+
case "restart":
|
|
266
|
+
return PlyrRestartButton;
|
|
267
|
+
case "rewind":
|
|
268
|
+
return PlyrRewindButton;
|
|
269
|
+
case "settings":
|
|
270
|
+
return PlyrSettings;
|
|
271
|
+
default:
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function PlyrAirPlayButton() {
|
|
276
|
+
const { icons: Icons } = usePlyrLayoutContext(), airPlayText = usePlyrLayoutWord("AirPlay");
|
|
277
|
+
return slot(
|
|
278
|
+
"airPlayButton",
|
|
279
|
+
/* @__PURE__ */ React.createElement(AirPlayButton, { className: "plyr__controls__item plyr__control", "data-plyr": "airplay" }, /* @__PURE__ */ React.createElement(Icons.AirPlay, null), /* @__PURE__ */ React.createElement("span", { className: "plyr__tooltip" }, airPlayText))
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
PlyrAirPlayButton.displayName = "PlyrAirPlayButton";
|
|
283
|
+
function PlyrCaptionsButton() {
|
|
284
|
+
const { icons: Icons } = usePlyrLayoutContext(), enableText = usePlyrLayoutWord("Enable captions"), disableText = usePlyrLayoutWord("Disable captions");
|
|
285
|
+
return slot(
|
|
286
|
+
"captionsButton",
|
|
287
|
+
/* @__PURE__ */ React.createElement(
|
|
288
|
+
CaptionButton,
|
|
289
|
+
{
|
|
290
|
+
className: "plyr__controls__item plyr__control",
|
|
291
|
+
"data-no-label": true,
|
|
292
|
+
"data-plyr": "captions"
|
|
293
|
+
},
|
|
294
|
+
/* @__PURE__ */ React.createElement(Icons.CaptionsOn, { className: "icon--pressed" }),
|
|
295
|
+
/* @__PURE__ */ React.createElement(Icons.CaptionsOff, { className: "icon--not-pressed" }),
|
|
296
|
+
/* @__PURE__ */ React.createElement("span", { className: "label--pressed plyr__tooltip" }, disableText),
|
|
297
|
+
/* @__PURE__ */ React.createElement("span", { className: "label--not-pressed plyr__tooltip" }, enableText)
|
|
298
|
+
)
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
PlyrCaptionsButton.displayName = "PlyrCaptionsButton";
|
|
302
|
+
function PlyrFullscreenButton() {
|
|
303
|
+
const { icons: Icons } = usePlyrLayoutContext(), enterText = usePlyrLayoutWord("Enter Fullscreen"), exitText = usePlyrLayoutWord("Exit Fullscreen");
|
|
304
|
+
return slot(
|
|
305
|
+
"fullscreenButton",
|
|
306
|
+
/* @__PURE__ */ React.createElement(
|
|
307
|
+
FullscreenButton,
|
|
308
|
+
{
|
|
309
|
+
className: "plyr__controls__item plyr__control",
|
|
310
|
+
"data-no-label": true,
|
|
311
|
+
"data-plyr": "fullscreen"
|
|
312
|
+
},
|
|
313
|
+
/* @__PURE__ */ React.createElement(Icons.EnterFullscreen, { className: "icon--pressed" }),
|
|
314
|
+
/* @__PURE__ */ React.createElement(Icons.ExitFullscreen, { className: "icon--not-pressed" }),
|
|
315
|
+
/* @__PURE__ */ React.createElement("span", { className: "label--pressed plyr__tooltip" }, exitText),
|
|
316
|
+
/* @__PURE__ */ React.createElement("span", { className: "label--not-pressed plyr__tooltip" }, enterText)
|
|
317
|
+
)
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
PlyrFullscreenButton.displayName = "PlyrFullscreenButton";
|
|
321
|
+
function PlyrPIPButton() {
|
|
322
|
+
const { icons: Icons } = usePlyrLayoutContext(), enterText = usePlyrLayoutWord("Enter PiP"), exitText = usePlyrLayoutWord("Exit PiP");
|
|
323
|
+
return slot(
|
|
324
|
+
"pipButton",
|
|
325
|
+
/* @__PURE__ */ React.createElement(PIPButton, { className: "plyr__controls__item plyr__control", "data-no-label": true, "data-plyr": "pip" }, /* @__PURE__ */ React.createElement(Icons.EnterPiP, { className: "icon--pressed" }), /* @__PURE__ */ React.createElement(Icons.ExitPiP, { className: "icon--not-pressed" }), /* @__PURE__ */ React.createElement("span", { className: "label--pressed plyr__tooltip" }, exitText), /* @__PURE__ */ React.createElement("span", { className: "label--not-pressed plyr__tooltip" }, enterText))
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
PlyrPIPButton.displayName = "PlyrPIPButton";
|
|
329
|
+
function PlyrMuteButton() {
|
|
330
|
+
const { icons: Icons } = usePlyrLayoutContext(), muteText = usePlyrLayoutWord("Mute"), unmuteText = usePlyrLayoutWord("Unmute");
|
|
331
|
+
return slot(
|
|
332
|
+
"muteButton",
|
|
333
|
+
/* @__PURE__ */ React.createElement(MuteButton, { className: "plyr__control", "data-no-label": true, "data-plyr": "mute" }, /* @__PURE__ */ React.createElement(Icons.Muted, { className: "icon--pressed" }), /* @__PURE__ */ React.createElement(Icons.Volume, { className: "icon--not-pressed" }), /* @__PURE__ */ React.createElement("span", { className: "label--pressed plyr__tooltip" }, unmuteText), /* @__PURE__ */ React.createElement("span", { className: "label--not-pressed plyr__tooltip" }, muteText))
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
PlyrMuteButton.displayName = "PlyrMuteButton";
|
|
337
|
+
function PlyrPlayButton() {
|
|
338
|
+
const { icons: Icons } = usePlyrLayoutContext(), playText = usePlyrLayoutWord("Play"), pauseText = usePlyrLayoutWord("Pause");
|
|
339
|
+
return slot(
|
|
340
|
+
"playButton",
|
|
341
|
+
/* @__PURE__ */ React.createElement(PlayButton, { className: "plyr__controls__item plyr__control", "data-no-label": true, "data-plyr": "play" }, /* @__PURE__ */ React.createElement(Icons.Pause, { className: "icon--pressed" }), /* @__PURE__ */ React.createElement(Icons.Play, { className: "icon--not-pressed" }), /* @__PURE__ */ React.createElement("span", { className: "label--pressed plyr__tooltip" }, pauseText), /* @__PURE__ */ React.createElement("span", { className: "label--not-pressed plyr__tooltip" }, playText))
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
PlyrPlayButton.displayName = "PlyrPlayButton";
|
|
345
|
+
function PlyrRestartButton() {
|
|
346
|
+
const { icons: Icons } = usePlyrLayoutContext(), restartText = usePlyrLayoutWord("Restart"), remote = useMediaRemote();
|
|
347
|
+
function onPress({ nativeEvent: event }) {
|
|
348
|
+
if (isKeyboardEvent(event) && !isKeyboardClick(event)) return;
|
|
349
|
+
remote.seek(0, event);
|
|
350
|
+
}
|
|
351
|
+
return slot(
|
|
352
|
+
"restartButton",
|
|
353
|
+
/* @__PURE__ */ React.createElement(
|
|
354
|
+
"button",
|
|
355
|
+
{
|
|
356
|
+
type: "button",
|
|
357
|
+
className: "plyr__control",
|
|
358
|
+
"data-plyr": "restart",
|
|
359
|
+
onPointerUp: onPress,
|
|
360
|
+
onKeyDown: onPress
|
|
361
|
+
},
|
|
362
|
+
/* @__PURE__ */ React.createElement("slot", { name: "restart-icon", "data-class": "" }),
|
|
363
|
+
/* @__PURE__ */ React.createElement(Icons.Restart, null),
|
|
364
|
+
/* @__PURE__ */ React.createElement("span", { className: "plyr__tooltip" }, restartText)
|
|
365
|
+
)
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
PlyrRestartButton.displayName = "PlyrRestartButton";
|
|
369
|
+
function PlyrFastForwardButton() {
|
|
370
|
+
const { icons: Icons, seekTime } = usePlyrLayoutContext(), forwardText = usePlyrLayoutWord("Forward"), label = `${forwardText} ${seekTime}s`;
|
|
371
|
+
return slot(
|
|
372
|
+
"fastForwardButton",
|
|
373
|
+
/* @__PURE__ */ React.createElement(
|
|
374
|
+
SeekButton,
|
|
375
|
+
{
|
|
376
|
+
className: "plyr__controls__item plyr__control",
|
|
377
|
+
seconds: seekTime,
|
|
378
|
+
"data-no-label": true,
|
|
379
|
+
"data-plyr": "fast-forward"
|
|
380
|
+
},
|
|
381
|
+
/* @__PURE__ */ React.createElement(Icons.FastForward, null),
|
|
382
|
+
/* @__PURE__ */ React.createElement("span", { className: "plyr__tooltip" }, label)
|
|
383
|
+
)
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
PlyrFastForwardButton.displayName = "PlyrFastForwardButton";
|
|
387
|
+
function PlyrRewindButton() {
|
|
388
|
+
const { icons: Icons, seekTime } = usePlyrLayoutContext(), rewindText = usePlyrLayoutWord("Rewind"), label = `${rewindText} ${seekTime}s`;
|
|
389
|
+
return slot(
|
|
390
|
+
"rewindButton",
|
|
391
|
+
/* @__PURE__ */ React.createElement(
|
|
392
|
+
SeekButton,
|
|
393
|
+
{
|
|
394
|
+
className: "plyr__controls__item plyr__control",
|
|
395
|
+
seconds: -1 * seekTime,
|
|
396
|
+
"data-no-label": true,
|
|
397
|
+
"data-plyr": "rewind"
|
|
398
|
+
},
|
|
399
|
+
/* @__PURE__ */ React.createElement(Icons.Rewind, null),
|
|
400
|
+
/* @__PURE__ */ React.createElement("span", { className: "plyr__tooltip" }, label)
|
|
401
|
+
)
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
PlyrRewindButton.displayName = "PlyrRewindButton";
|
|
405
|
+
function PlyrTimeSlider() {
|
|
406
|
+
const { markers, thumbnails, seekTime, previewTime } = usePlyrLayoutContext(), $src = useMediaState("source"), $duration = useMediaState("duration"), seekText = usePlyrLayoutWord("Seek"), [activeMarker, setActiveMarker] = React.useState(null), $RemotionSliderThumbnail = useSignal(RemotionSliderThumbnail), $hasRemotionSliderThumbnail = $RemotionSliderThumbnail && isRemotionSrc($src);
|
|
407
|
+
function onSeekingRequest(time) {
|
|
408
|
+
previewTime.set(time);
|
|
409
|
+
}
|
|
410
|
+
function onMarkerEnter() {
|
|
411
|
+
setActiveMarker(this);
|
|
412
|
+
}
|
|
413
|
+
function onMarkerLeave() {
|
|
414
|
+
setActiveMarker(null);
|
|
415
|
+
}
|
|
416
|
+
const markerLabel = activeMarker ? /* @__PURE__ */ React.createElement(
|
|
417
|
+
"span",
|
|
418
|
+
{
|
|
419
|
+
className: "plyr__progress__marker-label",
|
|
420
|
+
dangerouslySetInnerHTML: { __html: activeMarker.label + "<br />" }
|
|
421
|
+
}
|
|
422
|
+
) : null;
|
|
423
|
+
return slot(
|
|
424
|
+
"timeSlider",
|
|
425
|
+
/* @__PURE__ */ React.createElement("div", { className: "plyr__controls__item plyr__progress__container" }, /* @__PURE__ */ React.createElement("div", { className: "plyr__progress" }, /* @__PURE__ */ React.createElement(
|
|
426
|
+
Root$1,
|
|
427
|
+
{
|
|
428
|
+
className: "plyr__slider",
|
|
429
|
+
pauseWhileDragging: true,
|
|
430
|
+
keyStep: seekTime,
|
|
431
|
+
"aria-label": seekText,
|
|
432
|
+
"data-plyr": "seek",
|
|
433
|
+
onMediaSeekingRequest: onSeekingRequest
|
|
434
|
+
},
|
|
435
|
+
/* @__PURE__ */ React.createElement("div", { className: "plyr__slider__track" }),
|
|
436
|
+
/* @__PURE__ */ React.createElement("div", { className: "plyr__slider__thumb" }),
|
|
437
|
+
/* @__PURE__ */ React.createElement("div", { className: "plyr__slider__buffer" }),
|
|
438
|
+
!thumbnails && !$hasRemotionSliderThumbnail ? /* @__PURE__ */ React.createElement("span", { className: "plyr__tooltip" }, markerLabel, /* @__PURE__ */ React.createElement(Value, null)) : $hasRemotionSliderThumbnail ? /* @__PURE__ */ React.createElement(Preview, { className: "plyr__slider__preview" }, /* @__PURE__ */ React.createElement("div", { className: "plyr__slider__preview__thumbnail" }, /* @__PURE__ */ React.createElement("span", { className: "plyr__slider__preview__time-container" }, markerLabel, /* @__PURE__ */ React.createElement(Value, { className: "plyr__slider__preview__time" })), /* @__PURE__ */ React.createElement($RemotionSliderThumbnail, { className: "plyr__slider__preview__thumbnail" }))) : /* @__PURE__ */ React.createElement(Preview, { className: "plyr__slider__preview" }, /* @__PURE__ */ React.createElement(
|
|
439
|
+
Thumbnail.Root,
|
|
440
|
+
{
|
|
441
|
+
src: thumbnails,
|
|
442
|
+
className: "plyr__slider__preview__thumbnail"
|
|
443
|
+
},
|
|
444
|
+
/* @__PURE__ */ React.createElement("span", { className: "plyr__slider__preview__time-container" }, markerLabel, /* @__PURE__ */ React.createElement(Value, { className: "plyr__slider__preview__time" })),
|
|
445
|
+
/* @__PURE__ */ React.createElement(Thumbnail.Img, null)
|
|
446
|
+
)),
|
|
447
|
+
markers && Number.isFinite($duration) ? markers.map((marker, i) => /* @__PURE__ */ React.createElement(
|
|
448
|
+
"span",
|
|
449
|
+
{
|
|
450
|
+
className: "plyr__progress__marker",
|
|
451
|
+
key: i,
|
|
452
|
+
onMouseEnter: onMarkerEnter.bind(marker),
|
|
453
|
+
onMouseLeave: onMarkerLeave,
|
|
454
|
+
style: { left: `${marker.time / $duration * 100}%` }
|
|
455
|
+
}
|
|
456
|
+
)) : null
|
|
457
|
+
)))
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
PlyrTimeSlider.displayName = "PlyrTimeSlider";
|
|
461
|
+
function PlyrVolumeSlider() {
|
|
462
|
+
const volumeText = usePlyrLayoutWord("Volume");
|
|
463
|
+
return slot(
|
|
464
|
+
"volumeSlider",
|
|
465
|
+
/* @__PURE__ */ React.createElement(Root$4, { className: "plyr__slider", "data-plyr": "volume", "aria-label": volumeText }, /* @__PURE__ */ React.createElement("div", { className: "plyr__slider__track" }), /* @__PURE__ */ React.createElement("div", { className: "plyr__slider__thumb" }))
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
PlyrVolumeSlider.displayName = "PlyrVolumeSlider";
|
|
469
|
+
function PlyrVolume({ type }) {
|
|
470
|
+
const hasMuteButton = type === "mute" || type === "mute+volume", hasVolumeSlider = type === "volume" || type === "mute+volume";
|
|
471
|
+
return /* @__PURE__ */ React.createElement("div", { className: "plyr__controls__item plyr__volume" }, hasMuteButton ? /* @__PURE__ */ React.createElement(PlyrMuteButton, null) : null, hasVolumeSlider ? /* @__PURE__ */ React.createElement(PlyrVolumeSlider, null) : null);
|
|
472
|
+
}
|
|
473
|
+
PlyrVolume.displayName = "PlyrVolume";
|
|
474
|
+
function PlyrCurrentTime() {
|
|
475
|
+
const { invertTime, toggleTime, displayDuration } = usePlyrLayoutContext(), $streamType = useMediaState("streamType"), currentTimeText = usePlyrLayoutWord("Current time"), liveText = usePlyrLayoutWord("LIVE"), [invert, setInvert] = React.useState(invertTime), remainder = !displayDuration && invert;
|
|
476
|
+
function onPress({ nativeEvent: event }) {
|
|
477
|
+
if (!toggleTime || displayDuration || isKeyboardEvent(event) && !isKeyboardClick(event)) {
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
setInvert((n) => !n);
|
|
481
|
+
}
|
|
482
|
+
return slot(
|
|
483
|
+
"currentTime",
|
|
484
|
+
$streamType === "live" || $streamType === "ll-live" ? /* @__PURE__ */ React.createElement(LiveButton, { className: "plyr__controls__item plyr__control plyr__live-button", "data-plyr": "live" }, /* @__PURE__ */ React.createElement("span", { className: "plyr__live-button__text" }, liveText)) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
485
|
+
Time,
|
|
486
|
+
{
|
|
487
|
+
type: "current",
|
|
488
|
+
className: "plyr__controls__item plyr__time plyr__time--current",
|
|
489
|
+
role: "timer",
|
|
490
|
+
"aria-label": currentTimeText,
|
|
491
|
+
tabIndex: 0,
|
|
492
|
+
remainder,
|
|
493
|
+
onPointerUp: onPress,
|
|
494
|
+
onKeyDown: onPress
|
|
495
|
+
}
|
|
496
|
+
), displayDuration ? /* @__PURE__ */ React.createElement(PlyrDuration, null) : null)
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
PlyrCurrentTime.displayName = "PlyrCurrentTime";
|
|
500
|
+
function PlyrDuration() {
|
|
501
|
+
const durationText = usePlyrLayoutWord("Duration");
|
|
502
|
+
return slot(
|
|
503
|
+
"duration",
|
|
504
|
+
/* @__PURE__ */ React.createElement(
|
|
505
|
+
Time,
|
|
506
|
+
{
|
|
507
|
+
className: "plyr__controls__item plyr__time plyr__time--duration",
|
|
508
|
+
type: "duration",
|
|
509
|
+
role: "timer",
|
|
510
|
+
tabIndex: 0,
|
|
511
|
+
"aria-label": durationText
|
|
512
|
+
}
|
|
513
|
+
)
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
PlyrDuration.displayName = "PlyrDuration";
|
|
517
|
+
function PlyrDownloadButton() {
|
|
518
|
+
const { download } = usePlyrLayoutContext(), $src = useMediaState("source"), $title = useMediaState("title"), file = getDownloadFile({
|
|
519
|
+
title: $title,
|
|
520
|
+
src: $src,
|
|
521
|
+
download
|
|
522
|
+
}), downloadText = usePlyrLayoutWord("Download");
|
|
523
|
+
return slot(
|
|
524
|
+
"download",
|
|
525
|
+
isString(file?.url) ? /* @__PURE__ */ React.createElement(
|
|
526
|
+
"a",
|
|
527
|
+
{
|
|
528
|
+
className: "plyr__controls__item plyr__control",
|
|
529
|
+
href: appendParamsToURL(file.url, { download: file.name }),
|
|
530
|
+
download: file.name,
|
|
531
|
+
target: "_blank"
|
|
532
|
+
},
|
|
533
|
+
/* @__PURE__ */ React.createElement("slot", { name: "download-icon" }),
|
|
534
|
+
/* @__PURE__ */ React.createElement("span", { className: "plyr__tooltip" }, downloadText)
|
|
535
|
+
) : null
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
PlyrDownloadButton.displayName = "PlyrDownloadButton";
|
|
539
|
+
function PlyrGestures() {
|
|
540
|
+
const { clickToPlay, clickToFullscreen } = usePlyrLayoutContext();
|
|
541
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, clickToPlay ? /* @__PURE__ */ React.createElement(Gesture, { className: "plyr__gesture", event: "pointerup", action: "toggle:paused" }) : null, clickToFullscreen ? /* @__PURE__ */ React.createElement(Gesture, { className: "plyr__gesture", event: "dblpointerup", action: "toggle:fullscreen" }) : null);
|
|
542
|
+
}
|
|
543
|
+
PlyrGestures.displayName = "PlyrGestures";
|
|
544
|
+
function PlyrCaptions() {
|
|
545
|
+
const $track = useMediaState("textTrack"), [activeCue, setActiveCue] = React.useState(null);
|
|
546
|
+
React.useEffect(() => {
|
|
547
|
+
if (!$track) return;
|
|
548
|
+
function onCueChange() {
|
|
549
|
+
setActiveCue($track ? $track.activeCues[0] : null);
|
|
550
|
+
}
|
|
551
|
+
onCueChange();
|
|
552
|
+
return listenEvent($track, "cue-change", onCueChange);
|
|
553
|
+
}, [$track]);
|
|
554
|
+
return /* @__PURE__ */ React.createElement("div", { className: "plyr__captions", dir: "auto" }, /* @__PURE__ */ React.createElement(
|
|
555
|
+
"span",
|
|
556
|
+
{
|
|
557
|
+
className: "plyr__caption",
|
|
558
|
+
dangerouslySetInnerHTML: {
|
|
559
|
+
__html: activeCue?.text || ""
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
));
|
|
563
|
+
}
|
|
564
|
+
PlyrCaptions.displayName = "PlyrCaptions";
|
|
565
|
+
function PlyrSettings() {
|
|
566
|
+
const { icons: Icons } = usePlyrLayoutContext(), settingsText = usePlyrLayoutWord("Settings");
|
|
567
|
+
return slot(
|
|
568
|
+
"settings",
|
|
569
|
+
/* @__PURE__ */ React.createElement("div", { className: "plyr__controls__item plyr__menu" }, /* @__PURE__ */ React.createElement(Root$2, null, /* @__PURE__ */ React.createElement(Button, { className: "plyr__control", "data-plyr": "settings" }, slot(
|
|
570
|
+
"settingsButton",
|
|
571
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icons.Settings, null), /* @__PURE__ */ React.createElement("span", { className: "plyr__tooltip" }, settingsText))
|
|
572
|
+
)), /* @__PURE__ */ React.createElement(Items, { className: "plyr__menu__container", placement: "top end" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, slot(
|
|
573
|
+
"settingsMenu",
|
|
574
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PlyrAudioMenu, null), /* @__PURE__ */ React.createElement(PlyrCaptionsMenu, null), /* @__PURE__ */ React.createElement(PlyrQualityMenu, null), /* @__PURE__ */ React.createElement(PlyrSpeedMenu, null))
|
|
575
|
+
))))))
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
PlyrSettings.displayName = "PlyrSettings";
|
|
579
|
+
function PlyrMenuButton({
|
|
580
|
+
label,
|
|
581
|
+
hint,
|
|
582
|
+
open,
|
|
583
|
+
disabled
|
|
584
|
+
}) {
|
|
585
|
+
const buttonText = usePlyrLayoutWord(label), goBackText = usePlyrLayoutWord("Go back to previous menu");
|
|
586
|
+
return /* @__PURE__ */ React.createElement(
|
|
587
|
+
Button,
|
|
588
|
+
{
|
|
589
|
+
className: `plyr__control plyr__control--${open ? "back" : "forward"}`,
|
|
590
|
+
"data-plyr": "settings",
|
|
591
|
+
disabled
|
|
592
|
+
},
|
|
593
|
+
/* @__PURE__ */ React.createElement("span", { className: "plyr__menu__label", "aria-hidden": open ? "true" : void 0 }, buttonText),
|
|
594
|
+
hint ? /* @__PURE__ */ React.createElement("span", { className: "plyr__menu__value" }, hint) : null,
|
|
595
|
+
open ? /* @__PURE__ */ React.createElement("span", { className: "plyr__sr-only" }, goBackText) : null
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
PlyrMenuButton.displayName = "PlyrMenuButton";
|
|
599
|
+
function PlyrMenu({
|
|
600
|
+
label,
|
|
601
|
+
hint,
|
|
602
|
+
children,
|
|
603
|
+
disabled
|
|
604
|
+
}) {
|
|
605
|
+
const [open, setOpen] = React.useState(false);
|
|
606
|
+
function onOpen() {
|
|
607
|
+
setOpen(true);
|
|
608
|
+
}
|
|
609
|
+
function onClose() {
|
|
610
|
+
setOpen(false);
|
|
611
|
+
}
|
|
612
|
+
return /* @__PURE__ */ React.createElement(Root$2, { onOpen, onClose }, /* @__PURE__ */ React.createElement(PlyrMenuButton, { label, open, hint, disabled }), /* @__PURE__ */ React.createElement(Items, null, children));
|
|
613
|
+
}
|
|
614
|
+
PlyrMenu.displayName = "PlyrMenu";
|
|
615
|
+
function PlyrAudioMenu() {
|
|
616
|
+
const defaultText = usePlyrLayoutWord("Default"), $track = useMediaState("audioTrack"), options = useAudioOptions();
|
|
617
|
+
return /* @__PURE__ */ React.createElement(PlyrMenu, { label: "Audio", hint: $track?.label ?? defaultText, disabled: options.disabled }, /* @__PURE__ */ React.createElement(Root$3, { value: options.selectedValue }, options.map(({ label, value, select }) => /* @__PURE__ */ React.createElement(Item, { className: "plyr__control", value, onSelect: select, key: value }, /* @__PURE__ */ React.createElement("span", null, label)))));
|
|
618
|
+
}
|
|
619
|
+
PlyrAudioMenu.displayName = "PlyrAudioMenu";
|
|
620
|
+
function PlyrSpeedMenu() {
|
|
621
|
+
const normalLabel = usePlyrLayoutWord("Normal"), options = usePlaybackRateOptions({ normalLabel }), hint = options.selectedValue === "1" ? normalLabel : options.selectedValue + "x";
|
|
622
|
+
return /* @__PURE__ */ React.createElement(PlyrMenu, { label: "Speed", hint, disabled: options.disabled }, /* @__PURE__ */ React.createElement(Root$3, { value: options.selectedValue }, options.map(({ label, value, select }) => /* @__PURE__ */ React.createElement(Item, { className: "plyr__control", value, onSelect: select, key: value }, /* @__PURE__ */ React.createElement("span", null, label)))));
|
|
623
|
+
}
|
|
624
|
+
PlyrSpeedMenu.displayName = "PlyrSpeedMenu";
|
|
625
|
+
function PlyrCaptionsMenu() {
|
|
626
|
+
const offText = usePlyrLayoutWord("Disabled"), options = useCaptionOptions({ off: offText }), hint = options.selectedTrack?.label ?? offText;
|
|
627
|
+
return /* @__PURE__ */ React.createElement(PlyrMenu, { label: "Captions", hint, disabled: options.disabled }, /* @__PURE__ */ React.createElement(Root$3, { value: options.selectedValue }, options.map(({ label, value, select }) => /* @__PURE__ */ React.createElement(Item, { className: "plyr__control", value, onSelect: select, key: value }, /* @__PURE__ */ React.createElement("span", null, label)))));
|
|
628
|
+
}
|
|
629
|
+
PlyrCaptionsMenu.displayName = "PlyrCaptionsMenu";
|
|
630
|
+
function PlyrQualityMenu() {
|
|
631
|
+
const autoText = usePlyrLayoutWord("Auto"), options = useVideoQualityOptions({ auto: autoText, sort: "descending" }), currentQuality = options.selectedQuality?.height, hint = options.selectedValue !== "auto" && currentQuality ? `${currentQuality}p` : `${autoText}${currentQuality ? ` (${currentQuality}p)` : ""}`;
|
|
632
|
+
return /* @__PURE__ */ React.createElement(PlyrMenu, { label: "Quality", hint, disabled: options.disabled }, /* @__PURE__ */ React.createElement(Root$3, { value: options.selectedValue }, options.map(({ label, value, select }) => /* @__PURE__ */ React.createElement(Item, { className: "plyr__control", value, onSelect: select, key: value }, /* @__PURE__ */ React.createElement("span", null, label)))));
|
|
633
|
+
}
|
|
634
|
+
PlyrQualityMenu.displayName = "PlyrQualityMenu";
|
|
635
|
+
|
|
636
|
+
export { PlyrAudioLayout, PlyrLayout, PlyrLayoutContext, PlyrVideoLayout, i18n, usePlyrLayoutContext, usePlyrLayoutWord };
|