@hanifhan1f/vidstack-react 1.12.13
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/.templates/sandbox/document.css +27 -0
- package/.templates/sandbox/favicon-32x32.png +0 -0
- package/.templates/sandbox/index.html +21 -0
- package/.templates/sandbox/main.tsx +12 -0
- package/.templates/sandbox/player.css +39 -0
- package/.templates/sandbox/player.tsx +121 -0
- package/.templates/sandbox/tracks.ts +23 -0
- package/LICENSE +21 -0
- package/README.md +23 -0
- package/analyze.config.ts +7 -0
- package/build/build-icons.js +62 -0
- package/npm/analyze.json.d.ts +7 -0
- package/package.json +162 -0
- package/rollup.config.ts +256 -0
- package/src/components/announcer.tsx +47 -0
- package/src/components/layouts/default/audio-layout.tsx +231 -0
- package/src/components/layouts/default/context.ts +28 -0
- package/src/components/layouts/default/hooks.ts +13 -0
- package/src/components/layouts/default/icons.tsx +225 -0
- package/src/components/layouts/default/index.ts +11 -0
- package/src/components/layouts/default/media-layout.tsx +259 -0
- package/src/components/layouts/default/slots.tsx +98 -0
- package/src/components/layouts/default/ui/announcer.tsx +22 -0
- package/src/components/layouts/default/ui/buttons.tsx +301 -0
- package/src/components/layouts/default/ui/captions.tsx +16 -0
- package/src/components/layouts/default/ui/controls.tsx +12 -0
- package/src/components/layouts/default/ui/keyboard-display.tsx +132 -0
- package/src/components/layouts/default/ui/menus/accessibility-menu.tsx +100 -0
- package/src/components/layouts/default/ui/menus/audio-menu.tsx +167 -0
- package/src/components/layouts/default/ui/menus/captions-menu.tsx +61 -0
- package/src/components/layouts/default/ui/menus/chapters-menu.tsx +132 -0
- package/src/components/layouts/default/ui/menus/font-menu.tsx +331 -0
- package/src/components/layouts/default/ui/menus/items/menu-checkbox.tsx +72 -0
- package/src/components/layouts/default/ui/menus/items/menu-items.tsx +135 -0
- package/src/components/layouts/default/ui/menus/items/menu-slider.tsx +92 -0
- package/src/components/layouts/default/ui/menus/playback-menu.tsx +232 -0
- package/src/components/layouts/default/ui/menus/settings-menu.tsx +114 -0
- package/src/components/layouts/default/ui/menus/utils.ts +12 -0
- package/src/components/layouts/default/ui/sliders.tsx +136 -0
- package/src/components/layouts/default/ui/time.tsx +73 -0
- package/src/components/layouts/default/ui/title.tsx +24 -0
- package/src/components/layouts/default/ui/tooltip.tsx +27 -0
- package/src/components/layouts/default/ui.ts +8 -0
- package/src/components/layouts/default/video-layout.tsx +344 -0
- package/src/components/layouts/plyr/context.ts +26 -0
- package/src/components/layouts/plyr/icons/plyr-airplay.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-captions-off.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-captions-on.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-download.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-enter-fullscreen.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-exit-fullscreen.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-fast-forward.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-muted.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-pause.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-pip.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-play.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-restart.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-rewind.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-settings.js +1 -0
- package/src/components/layouts/plyr/icons/plyr-volume.js +1 -0
- package/src/components/layouts/plyr/icons.tsx +71 -0
- package/src/components/layouts/plyr/index.ts +11 -0
- package/src/components/layouts/plyr/layout.tsx +1024 -0
- package/src/components/layouts/plyr/props.ts +104 -0
- package/src/components/layouts/plyr/slots.tsx +52 -0
- package/src/components/layouts/remotion-ui.ts +13 -0
- package/src/components/layouts/utils.ts +17 -0
- package/src/components/player-callbacks.ts +67 -0
- package/src/components/player.tsx +67 -0
- package/src/components/primitives/instances.ts +92 -0
- package/src/components/primitives/nodes.tsx +58 -0
- package/src/components/primitives/slot.tsx +132 -0
- package/src/components/provider.tsx +187 -0
- package/src/components/text-track.tsx +106 -0
- package/src/components/ui/buttons/airplay-button.tsx +53 -0
- package/src/components/ui/buttons/caption-button.tsx +55 -0
- package/src/components/ui/buttons/fullscreen-button.tsx +55 -0
- package/src/components/ui/buttons/google-cast-button.tsx +53 -0
- package/src/components/ui/buttons/live-button.tsx +56 -0
- package/src/components/ui/buttons/mute-button.tsx +60 -0
- package/src/components/ui/buttons/pip-button.tsx +54 -0
- package/src/components/ui/buttons/play-button.tsx +53 -0
- package/src/components/ui/buttons/seek-button.tsx +55 -0
- package/src/components/ui/buttons/toggle-button.tsx +51 -0
- package/src/components/ui/caption.tsx +70 -0
- package/src/components/ui/captions.tsx +41 -0
- package/src/components/ui/chapter-title.tsx +40 -0
- package/src/components/ui/controls.tsx +90 -0
- package/src/components/ui/gesture.tsx +43 -0
- package/src/components/ui/menu.tsx +251 -0
- package/src/components/ui/poster.tsx +101 -0
- package/src/components/ui/radio-group.tsx +88 -0
- package/src/components/ui/sliders/audio-gain-slider.tsx +55 -0
- package/src/components/ui/sliders/quality-slider.tsx +54 -0
- package/src/components/ui/sliders/slider-callbacks.ts +14 -0
- package/src/components/ui/sliders/slider-value.tsx +13 -0
- package/src/components/ui/sliders/slider.tsx +254 -0
- package/src/components/ui/sliders/speed-slider.tsx +54 -0
- package/src/components/ui/sliders/time-slider.tsx +379 -0
- package/src/components/ui/sliders/volume-slider.tsx +55 -0
- package/src/components/ui/spinner.tsx +105 -0
- package/src/components/ui/thumbnail.tsx +82 -0
- package/src/components/ui/time.tsx +77 -0
- package/src/components/ui/title.tsx +32 -0
- package/src/components/ui/tooltip.tsx +135 -0
- package/src/globals.d.ts +3 -0
- package/src/hooks/create-text-track.ts +22 -0
- package/src/hooks/options/use-audio-gain-options.ts +75 -0
- package/src/hooks/options/use-audio-options.ts +71 -0
- package/src/hooks/options/use-caption-options.ts +95 -0
- package/src/hooks/options/use-chapter-options.ts +97 -0
- package/src/hooks/options/use-playback-rate-options.ts +75 -0
- package/src/hooks/options/use-video-quality-options.ts +123 -0
- package/src/hooks/use-active-text-cues.ts +28 -0
- package/src/hooks/use-active-text-track.ts +19 -0
- package/src/hooks/use-chapter-title.ts +12 -0
- package/src/hooks/use-dom.ts +121 -0
- package/src/hooks/use-media-context.ts +6 -0
- package/src/hooks/use-media-player.ts +19 -0
- package/src/hooks/use-media-provider.ts +31 -0
- package/src/hooks/use-media-remote.ts +37 -0
- package/src/hooks/use-media-state.ts +58 -0
- package/src/hooks/use-signals.ts +24 -0
- package/src/hooks/use-slider-preview.ts +126 -0
- package/src/hooks/use-slider-state.ts +63 -0
- package/src/hooks/use-state.ts +47 -0
- package/src/hooks/use-text-cues.ts +33 -0
- package/src/hooks/use-thumbnails.ts +69 -0
- package/src/icon.ts +37 -0
- package/src/icons.ts +754 -0
- package/src/index.ts +181 -0
- package/src/providers/remotion/index.ts +10 -0
- package/src/providers/remotion/layout-engine.ts +123 -0
- package/src/providers/remotion/loader.ts +35 -0
- package/src/providers/remotion/playback-engine.ts +142 -0
- package/src/providers/remotion/provider.tsx +514 -0
- package/src/providers/remotion/type-check.ts +13 -0
- package/src/providers/remotion/types.ts +94 -0
- package/src/providers/remotion/ui/context.tsx +120 -0
- package/src/providers/remotion/ui/error-boundary.tsx +57 -0
- package/src/providers/remotion/ui/poster.tsx +33 -0
- package/src/providers/remotion/ui/slider-thumbnail.tsx +41 -0
- package/src/providers/remotion/ui/thumbnail.tsx +166 -0
- package/src/providers/remotion/validate.ts +220 -0
- package/src/source.ts +5 -0
- package/src/utils.ts +27 -0
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +11 -0
- package/types/react/src/components/announcer.d.ts +16 -0
- package/types/react/src/components/layouts/default/audio-layout.d.ts +27 -0
- package/types/react/src/components/layouts/default/context.d.ts +14 -0
- package/types/react/src/components/layouts/default/hooks.d.ts +2 -0
- package/types/react/src/components/layouts/default/icons.d.ts +95 -0
- package/types/react/src/components/layouts/default/index.d.ts +5 -0
- package/types/react/src/components/layouts/default/media-layout.d.ts +133 -0
- package/types/react/src/components/layouts/default/slots.d.ts +22 -0
- package/types/react/src/components/layouts/default/ui/announcer.d.ts +6 -0
- package/types/react/src/components/layouts/default/ui/buttons.d.ts +54 -0
- package/types/react/src/components/layouts/default/ui/captions.d.ts +6 -0
- package/types/react/src/components/layouts/default/ui/controls.d.ts +6 -0
- package/types/react/src/components/layouts/default/ui/keyboard-display.d.ts +8 -0
- package/types/react/src/components/layouts/default/ui/menus/accessibility-menu.d.ts +10 -0
- package/types/react/src/components/layouts/default/ui/menus/audio-menu.d.ts +10 -0
- package/types/react/src/components/layouts/default/ui/menus/captions-menu.d.ts +10 -0
- package/types/react/src/components/layouts/default/ui/menus/chapters-menu.d.ts +7 -0
- package/types/react/src/components/layouts/default/ui/menus/font-menu.d.ts +6 -0
- package/types/react/src/components/layouts/default/ui/menus/items/menu-checkbox.d.ts +13 -0
- package/types/react/src/components/layouts/default/ui/menus/items/menu-items.d.ts +49 -0
- package/types/react/src/components/layouts/default/ui/menus/items/menu-slider.d.ts +26 -0
- package/types/react/src/components/layouts/default/ui/menus/playback-menu.d.ts +10 -0
- package/types/react/src/components/layouts/default/ui/menus/settings-menu.d.ts +15 -0
- package/types/react/src/components/layouts/default/ui/menus/utils.d.ts +1 -0
- package/types/react/src/components/layouts/default/ui/sliders.d.ts +24 -0
- package/types/react/src/components/layouts/default/ui/time.d.ts +30 -0
- package/types/react/src/components/layouts/default/ui/title.d.ts +6 -0
- package/types/react/src/components/layouts/default/ui/tooltip.d.ts +12 -0
- package/types/react/src/components/layouts/default/ui.d.ts +8 -0
- package/types/react/src/components/layouts/default/video-layout.d.ts +47 -0
- package/types/react/src/components/layouts/plyr/context.d.ts +12 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-airplay.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-captions-off.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-captions-on.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-download.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-enter-fullscreen.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-exit-fullscreen.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-fast-forward.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-muted.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-pause.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-pip.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-play.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-restart.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-rewind.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-settings.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons/plyr-volume.d.ts +2 -0
- package/types/react/src/components/layouts/plyr/icons.d.ts +25 -0
- package/types/react/src/components/layouts/plyr/index.d.ts +6 -0
- package/types/react/src/components/layouts/plyr/layout.d.ts +17 -0
- package/types/react/src/components/layouts/plyr/props.d.ts +71 -0
- package/types/react/src/components/layouts/plyr/slots.d.ts +9 -0
- package/types/react/src/components/layouts/remotion-ui.d.ts +3 -0
- package/types/react/src/components/layouts/utils.d.ts +1 -0
- package/types/react/src/components/player-callbacks.d.ts +6 -0
- package/types/react/src/components/player.d.ts +32 -0
- package/types/react/src/components/primitives/instances.d.ts +83 -0
- package/types/react/src/components/primitives/nodes.d.ts +15 -0
- package/types/react/src/components/primitives/slot.d.ts +11 -0
- package/types/react/src/components/provider.d.ts +26 -0
- package/types/react/src/components/text-track.d.ts +100 -0
- package/types/react/src/components/ui/buttons/airplay-button.d.ts +22 -0
- package/types/react/src/components/ui/buttons/caption-button.d.ts +24 -0
- package/types/react/src/components/ui/buttons/fullscreen-button.d.ts +24 -0
- package/types/react/src/components/ui/buttons/google-cast-button.d.ts +22 -0
- package/types/react/src/components/ui/buttons/live-button.d.ts +26 -0
- package/types/react/src/components/ui/buttons/mute-button.d.ts +30 -0
- package/types/react/src/components/ui/buttons/pip-button.d.ts +24 -0
- package/types/react/src/components/ui/buttons/play-button.d.ts +23 -0
- package/types/react/src/components/ui/buttons/seek-button.d.ts +25 -0
- package/types/react/src/components/ui/buttons/toggle-button.d.ts +22 -0
- package/types/react/src/components/ui/caption.d.ts +11 -0
- package/types/react/src/components/ui/captions.d.ts +20 -0
- package/types/react/src/components/ui/chapter-title.d.ts +20 -0
- package/types/react/src/components/ui/controls.d.ts +40 -0
- package/types/react/src/components/ui/gesture.d.ts +20 -0
- package/types/react/src/components/ui/menu.d.ts +102 -0
- package/types/react/src/components/ui/poster.d.ts +25 -0
- package/types/react/src/components/ui/radio-group.d.ts +39 -0
- package/types/react/src/components/ui/sliders/audio-gain-slider.d.ts +29 -0
- package/types/react/src/components/ui/sliders/quality-slider.d.ts +28 -0
- package/types/react/src/components/ui/sliders/slider-callbacks.d.ts +6 -0
- package/types/react/src/components/ui/sliders/slider-value.d.ts +9 -0
- package/types/react/src/components/ui/sliders/slider.d.ts +134 -0
- package/types/react/src/components/ui/sliders/speed-slider.d.ts +28 -0
- package/types/react/src/components/ui/sliders/time-slider.d.ts +124 -0
- package/types/react/src/components/ui/sliders/volume-slider.d.ts +29 -0
- package/types/react/src/components/ui/spinner.d.ts +31 -0
- package/types/react/src/components/ui/thumbnail.d.ts +26 -0
- package/types/react/src/components/ui/time.d.ts +20 -0
- package/types/react/src/components/ui/title.d.ts +15 -0
- package/types/react/src/components/ui/tooltip.d.ts +63 -0
- package/types/react/src/hooks/create-text-track.d.ts +7 -0
- package/types/react/src/hooks/options/use-audio-gain-options.d.ts +22 -0
- package/types/react/src/hooks/options/use-audio-options.d.ts +17 -0
- package/types/react/src/hooks/options/use-caption-options.d.ts +24 -0
- package/types/react/src/hooks/options/use-chapter-options.d.ts +18 -0
- package/types/react/src/hooks/options/use-playback-rate-options.d.ts +22 -0
- package/types/react/src/hooks/options/use-video-quality-options.d.ts +35 -0
- package/types/react/src/hooks/use-active-text-cues.d.ts +6 -0
- package/types/react/src/hooks/use-active-text-track.d.ts +5 -0
- package/types/react/src/hooks/use-chapter-title.d.ts +4 -0
- package/types/react/src/hooks/use-dom.d.ts +9 -0
- package/types/react/src/hooks/use-media-context.d.ts +1 -0
- package/types/react/src/hooks/use-media-player.d.ts +7 -0
- package/types/react/src/hooks/use-media-provider.d.ts +7 -0
- package/types/react/src/hooks/use-media-remote.d.ts +12 -0
- package/types/react/src/hooks/use-media-state.d.ts +15 -0
- package/types/react/src/hooks/use-signals.d.ts +5 -0
- package/types/react/src/hooks/use-slider-preview.d.ts +27 -0
- package/types/react/src/hooks/use-slider-state.d.ts +16 -0
- package/types/react/src/hooks/use-state.d.ts +18 -0
- package/types/react/src/hooks/use-text-cues.d.ts +6 -0
- package/types/react/src/hooks/use-thumbnails.d.ts +16 -0
- package/types/react/src/icon.d.ts +17 -0
- package/types/react/src/icons.d.ts +215 -0
- package/types/react/src/index.d.ts +78 -0
- package/types/react/src/providers/remotion/index.d.ts +7 -0
- package/types/react/src/providers/remotion/layout-engine.d.ts +8 -0
- package/types/react/src/providers/remotion/loader.d.ts +9 -0
- package/types/react/src/providers/remotion/playback-engine.d.ts +11 -0
- package/types/react/src/providers/remotion/provider.d.ts +26 -0
- package/types/react/src/providers/remotion/type-check.d.ts +6 -0
- package/types/react/src/providers/remotion/types.d.ts +91 -0
- package/types/react/src/providers/remotion/ui/context.d.ts +17 -0
- package/types/react/src/providers/remotion/ui/error-boundary.d.ts +21 -0
- package/types/react/src/providers/remotion/ui/poster.d.ts +18 -0
- package/types/react/src/providers/remotion/ui/slider-thumbnail.d.ts +17 -0
- package/types/react/src/providers/remotion/ui/thumbnail.d.ts +32 -0
- package/types/react/src/providers/remotion/validate.d.ts +12 -0
- package/types/react/src/source.d.ts +3 -0
- package/types/react/src/utils.d.ts +3 -0
- package/types/vidstack/src/core/api/src-types.d.ts +50 -0
- package/types/vidstack/src/utils/mime.d.ts +15 -0
- package/types/vidstack/src/utils/network.d.ts +17 -0
- package/types/vidstack/src/utils/support.d.ts +72 -0
- package/vite.config.ts +23 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { TooltipPlacement } from 'vidstack';
|
|
3
|
+
export interface DefaultTooltipProps {
|
|
4
|
+
content: string;
|
|
5
|
+
placement?: TooltipPlacement;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function DefaultTooltip({ content, placement, children }: DefaultTooltipProps): React.JSX.Element;
|
|
9
|
+
declare namespace DefaultTooltip {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
export { DefaultTooltip };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './audio-layout';
|
|
2
|
+
export * from './video-layout';
|
|
3
|
+
export * from './ui/menus/items/menu-checkbox';
|
|
4
|
+
export * from './ui/menus/items/menu-items';
|
|
5
|
+
export * from './ui/menus/items/menu-slider';
|
|
6
|
+
export * from './ui/tooltip';
|
|
7
|
+
export * from './icons';
|
|
8
|
+
export { DefaultKeyboardDisplay, type DefaultKeyboardDisplayProps } from './ui/keyboard-display';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type DefaultLayoutProps } from './media-layout';
|
|
3
|
+
import { type DefaultVideoLayoutSlots } from './slots';
|
|
4
|
+
export interface DefaultVideoLayoutProps extends DefaultLayoutProps<DefaultVideoLayoutSlots> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The video layout is our production-ready UI that's displayed when the media view type is set to
|
|
8
|
+
* 'video'. It includes support for picture-in-picture, fullscreen, slider chapters, slider
|
|
9
|
+
* previews, captions, audio/quality settings, live streams, and more out of the box.
|
|
10
|
+
*
|
|
11
|
+
* @attr data-match - Whether this layout is being used.
|
|
12
|
+
* @attr data-sm - The small layout is active
|
|
13
|
+
* @attr data-lg - The large layout is active.
|
|
14
|
+
* @attr data-size - The active layout size (sm or lg).
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <MediaPlayer src="video.mp4">
|
|
18
|
+
* <MediaProvider />
|
|
19
|
+
* <DefaultVideoLayout thumbnails="/thumbnails.vtt" icons={defaultLayoutIcons} />
|
|
20
|
+
* </MediaPlayer>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare function DefaultVideoLayout(props: DefaultVideoLayoutProps): React.JSX.Element;
|
|
24
|
+
declare namespace DefaultVideoLayout {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
export { DefaultVideoLayout };
|
|
28
|
+
declare function DefaultVideoLargeLayout(): React.JSX.Element;
|
|
29
|
+
declare namespace DefaultVideoLargeLayout {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
export { DefaultVideoLargeLayout };
|
|
33
|
+
declare function DefaultVideoSmallLayout(): React.JSX.Element;
|
|
34
|
+
declare namespace DefaultVideoSmallLayout {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export { DefaultVideoSmallLayout };
|
|
38
|
+
declare function DefaultVideoGestures(): React.JSX.Element | null;
|
|
39
|
+
declare namespace DefaultVideoGestures {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
export { DefaultVideoGestures };
|
|
43
|
+
declare function DefaultBufferingIndicator(): React.JSX.Element;
|
|
44
|
+
declare namespace DefaultBufferingIndicator {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
export { DefaultBufferingIndicator };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type WriteSignal } from 'maverick.js';
|
|
3
|
+
import type { PlyrLayoutWord } from 'vidstack';
|
|
4
|
+
import type { PlyrLayoutProps } from './props';
|
|
5
|
+
interface PlyrLayoutContext extends PlyrLayoutProps {
|
|
6
|
+
previewTime: WriteSignal<number>;
|
|
7
|
+
}
|
|
8
|
+
export declare const PlyrLayoutContext: React.Context<PlyrLayoutContext>;
|
|
9
|
+
export declare function usePlyrLayoutContext(): PlyrLayoutContext;
|
|
10
|
+
export declare function usePlyrLayoutWord(word: PlyrLayoutWord): any;
|
|
11
|
+
export declare function i18n(translations: any, word: string): any;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<g><path d=\"M16,1 L2,1 C1.447,1 1,1.447 1,2 L1,12 C1,12.553 1.447,13 2,13 L5,13 L5,11 L3,11 L3,3 L15,3 L15,11 L13,11 L13,13 L16,13 C16.553,13 17,12.553 17,12 L17,2 C17,1.447 16.553,1 16,1 L16,1 Z\"></path><polygon points=\"4 17 14 17 9 11\"></polygon></g>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<g fill-rule=\"evenodd\" fill-opacity=\"0.5\"><path d=\"M1,1 C0.4,1 0,1.4 0,2 L0,13 C0,13.6 0.4,14 1,14 L5.6,14 L8.3,16.7 C8.5,16.9 8.7,17 9,17 C9.3,17 9.5,16.9 9.7,16.7 L12.4,14 L17,14 C17.6,14 18,13.6 18,13 L18,2 C18,1.4 17.6,1 17,1 L1,1 Z M5.52,11.15 C7.51,11.15 8.53,9.83 8.8,8.74 L7.51,8.35 C7.32,9.01 6.73,9.8 5.52,9.8 C4.38,9.8 3.32,8.97 3.32,7.46 C3.32,5.85 4.44,5.09 5.5,5.09 C6.73,5.09 7.28,5.84 7.45,6.52 L8.75,6.11 C8.47,4.96 7.46,3.76 5.5,3.76 C3.6,3.76 1.89,5.2 1.89,7.46 C1.89,9.72 3.54,11.15 5.52,11.15 Z M13.09,11.15 C15.08,11.15 16.1,9.83 16.37,8.74 L15.08,8.35 C14.89,9.01 14.3,9.8 13.09,9.8 C11.95,9.8 10.89,8.97 10.89,7.46 C10.89,5.85 12.01,5.09 13.07,5.09 C14.3,5.09 14.85,5.84 15.02,6.52 L16.32,6.11 C16.04,4.96 15.03,3.76 13.07,3.76 C11.17,3.76 9.46,5.2 9.46,7.46 C9.46,9.72 11.11,11.15 13.09,11.15 Z\"></path></g>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<g fill-rule=\"evenodd\"><path d=\"M1,1 C0.4,1 0,1.4 0,2 L0,13 C0,13.6 0.4,14 1,14 L5.6,14 L8.3,16.7 C8.5,16.9 8.7,17 9,17 C9.3,17 9.5,16.9 9.7,16.7 L12.4,14 L17,14 C17.6,14 18,13.6 18,13 L18,2 C18,1.4 17.6,1 17,1 L1,1 Z M5.52,11.15 C7.51,11.15 8.53,9.83 8.8,8.74 L7.51,8.35 C7.32,9.01 6.73,9.8 5.52,9.8 C4.38,9.8 3.32,8.97 3.32,7.46 C3.32,5.85 4.44,5.09 5.5,5.09 C6.73,5.09 7.28,5.84 7.45,6.52 L8.75,6.11 C8.47,4.96 7.46,3.76 5.5,3.76 C3.6,3.76 1.89,5.2 1.89,7.46 C1.89,9.72 3.54,11.15 5.52,11.15 Z M13.09,11.15 C15.08,11.15 16.1,9.83 16.37,8.74 L15.08,8.35 C14.89,9.01 14.3,9.8 13.09,9.8 C11.95,9.8 10.89,8.97 10.89,7.46 C10.89,5.85 12.01,5.09 13.07,5.09 C14.3,5.09 14.85,5.84 15.02,6.52 L16.32,6.11 C16.04,4.96 15.03,3.76 13.07,3.76 C11.17,3.76 9.46,5.2 9.46,7.46 C9.46,9.72 11.11,11.15 13.09,11.15 Z\"></path></g>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<polygon points=\"12.4 12.5 14.5 10.4 16.6 12.5 18 11.1 15.9 9 18 6.9 16.6 5.5 14.5 7.6 12.4 5.5 11 6.9 13.1 9 11 11.1\"></polygon><path d=\"M3.78571429,6.00820648 L0.714285714,6.00820648 C0.285714286,6.00820648 0,6.30901277 0,6.76022222 L0,11.2723167 C0,11.7235261 0.285714286,12.0243324 0.714285714,12.0243324 L3.78571429,12.0243324 L7.85714286,15.8819922 C8.35714286,16.1827985 9,15.8819922 9,15.2803796 L9,2.75215925 C9,2.15054666 8.35714286,1.77453879 7.85714286,2.15054666 L3.78571429,6.00820648 Z\"></path>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<path d=\"M6,1 L3,1 C2.4,1 2,1.4 2,2 L2,16 C2,16.6 2.4,17 3,17 L6,17 C6.6,17 7,16.6 7,16 L7,2 C7,1.4 6.6,1 6,1 L6,1 Z\"></path><path d=\"M12,1 C11.4,1 11,1.4 11,2 L11,16 C11,16.6 11.4,17 12,17 L15,17 C15.6,17 16,16.6 16,16 L16,2 C16,1.4 15.6,1 15,1 L12,1 Z\"></path>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<polygon points=\"13.293 3.293 7.022 9.564 8.436 10.978 14.707 4.707 17 7 17 1 11 1\"></polygon><path d=\"M13,15 L3,15 L3,5 L8,5 L8,3 L2,3 C1.448,3 1,3.448 1,4 L1,16 C1,16.552 1.448,17 2,17 L14,17 C14.552,17 15,16.552 15,16 L15,10 L13,10 L13,15 L13,15 Z\"></path>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<path d=\"M15.5615866,8.10002147 L3.87056367,0.225209313 C3.05219207,-0.33727727 2,0.225209313 2,1.12518784 L2,16.8748122 C2,17.7747907 3.05219207,18.3372773 3.87056367,17.7747907 L15.5615866,9.89997853 C16.1461378,9.44998927 16.1461378,8.55001073 15.5615866,8.10002147 L15.5615866,8.10002147 Z\"></path>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<path d=\"M9.7,1.2 L10.4,7.6 L12.5,5.5 C14.4,7.4 14.4,10.6 12.5,12.5 C11.6,13.5 10.3,14 9,14 C7.7,14 6.4,13.5 5.5,12.5 C3.6,10.6 3.6,7.4 5.5,5.5 C6.1,4.9 6.9,4.4 7.8,4.2 L7.2,2.3 C6,2.6 4.9,3.2 4,4.1 C1.3,6.8 1.3,11.2 4,14 C5.3,15.3 7.1,16 8.9,16 C10.8,16 12.5,15.3 13.8,14 C16.5,11.3 16.5,6.9 13.8,4.1 L16,1.9 L9.7,1.2 L9.7,1.2 Z\"></path>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<path d=\"M16.135,7.784 C14.832,7.458 14.214,5.966 14.905,4.815 C15.227,4.279 15.13,3.817 14.811,3.499 L14.501,3.189 C14.183,2.871 13.721,2.774 13.185,3.095 C12.033,3.786 10.541,3.168 10.216,1.865 C10.065,1.258 9.669,1 9.219,1 L8.781,1 C8.331,1 7.936,1.258 7.784,1.865 C7.458,3.168 5.966,3.786 4.815,3.095 C4.279,2.773 3.816,2.87 3.498,3.188 L3.188,3.498 C2.87,3.816 2.773,4.279 3.095,4.815 C3.786,5.967 3.168,7.459 1.865,7.784 C1.26,7.935 1,8.33 1,8.781 L1,9.219 C1,9.669 1.258,10.064 1.865,10.216 C3.168,10.542 3.786,12.034 3.095,13.185 C2.773,13.721 2.87,14.183 3.189,14.501 L3.499,14.811 C3.818,15.13 4.281,15.226 4.815,14.905 C5.967,14.214 7.459,14.832 7.784,16.135 C7.935,16.742 8.331,17 8.781,17 L9.219,17 C9.669,17 10.064,16.742 10.216,16.135 C10.542,14.832 12.034,14.214 13.185,14.905 C13.72,15.226 14.182,15.13 14.501,14.811 L14.811,14.501 C15.129,14.183 15.226,13.72 14.905,13.185 C14.214,12.033 14.832,10.541 16.135,10.216 C16.742,10.065 17,9.669 17,9.219 L17,8.781 C17,8.33 16.74,7.935 16.135,7.784 L16.135,7.784 Z M9,12 C7.343,12 6,10.657 6,9 C6,7.343 7.343,6 9,6 C10.657,6 12,7.343 12,9 C12,10.657 10.657,12 9,12 L9,12 Z\"></path>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<path d=\"M15.5999996,3.3 C15.1999996,2.9 14.5999996,2.9 14.1999996,3.3 C13.7999996,3.7 13.7999996,4.3 14.1999996,4.7 C15.3999996,5.9 15.9999996,7.4 15.9999996,9 C15.9999996,10.6 15.3999996,12.1 14.1999996,13.3 C13.7999996,13.7 13.7999996,14.3 14.1999996,14.7 C14.3999996,14.9 14.6999996,15 14.8999996,15 C15.1999996,15 15.3999996,14.9 15.5999996,14.7 C17.0999996,13.2 17.9999996,11.2 17.9999996,9 C17.9999996,6.8 17.0999996,4.8 15.5999996,3.3 L15.5999996,3.3 Z\"></path><path d=\"M11.2819745,5.28197449 C10.9060085,5.65794047 10.9060085,6.22188944 11.2819745,6.59785542 C12.0171538,7.33303477 12.2772954,8.05605449 12.2772954,9.00000021 C12.2772954,9.93588462 11.851678,10.9172014 11.2819745,11.4869049 C10.9060085,11.8628709 10.9060085,12.4268199 11.2819745,12.8027859 C11.4271642,12.9479755 11.9176724,13.0649528 12.2998149,12.9592565 C12.4124479,12.9281035 12.5156669,12.8776063 12.5978555,12.8027859 C13.773371,11.732654 14.1311161,10.1597914 14.1312523,9.00000021 C14.1312723,8.8299555 14.1286311,8.66015647 14.119665,8.4897429 C14.0674781,7.49784946 13.8010171,6.48513613 12.5978554,5.28197449 C12.2218894,4.9060085 11.6579405,4.9060085 11.2819745,5.28197449 Z\"></path><path d=\"M3.78571429,6.00820648 L0.714285714,6.00820648 C0.285714286,6.00820648 0,6.30901277 0,6.76022222 L0,11.2723167 C0,11.7235261 0.285714286,12.0243324 0.714285714,12.0243324 L3.78571429,12.0243324 L7.85714286,15.8819922 C8.35714286,16.1827985 9,15.8819922 9,15.2803796 L9,2.75215925 C9,2.15054666 8.35714286,1.77453879 7.85714286,2.15054666 L3.78571429,6.00820648 Z\"></path>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const plyrLayoutIcons: PlyrLayoutIcons;
|
|
3
|
+
export interface PlyrLayoutIconProps extends React.PropsWithoutRef<React.SVGProps<SVGSVGElement>> {
|
|
4
|
+
}
|
|
5
|
+
export interface PlyrLayoutIcon {
|
|
6
|
+
(props: PlyrLayoutIconProps): React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface PlyrLayoutIcons {
|
|
9
|
+
AirPlay: PlyrLayoutIcon;
|
|
10
|
+
CaptionsOff: PlyrLayoutIcon;
|
|
11
|
+
CaptionsOn: PlyrLayoutIcon;
|
|
12
|
+
Download: PlyrLayoutIcon;
|
|
13
|
+
EnterFullscreen: PlyrLayoutIcon;
|
|
14
|
+
EnterPiP: PlyrLayoutIcon;
|
|
15
|
+
ExitFullscreen: PlyrLayoutIcon;
|
|
16
|
+
ExitPiP: PlyrLayoutIcon;
|
|
17
|
+
FastForward: PlyrLayoutIcon;
|
|
18
|
+
Muted: PlyrLayoutIcon;
|
|
19
|
+
Pause: PlyrLayoutIcon;
|
|
20
|
+
Play: PlyrLayoutIcon;
|
|
21
|
+
Restart: PlyrLayoutIcon;
|
|
22
|
+
Rewind: PlyrLayoutIcon;
|
|
23
|
+
Settings: PlyrLayoutIcon;
|
|
24
|
+
Volume: PlyrLayoutIcon;
|
|
25
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { type PlyrLayoutElementProps, PlyrLayout, PlyrAudioLayout, PlyrVideoLayout, } from './layout';
|
|
2
|
+
export type { PlyrLayoutProps } from './props';
|
|
3
|
+
export type { PlyrLayoutSlots, PlyrLayoutSlotName } from './slots';
|
|
4
|
+
export type { PlyrControl, PlyrLayoutTranslations, PlyrLayoutWord, PlyrMarker } from 'vidstack';
|
|
5
|
+
export * from './icons';
|
|
6
|
+
export * from './context';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PrimitivePropsWithRef } from '../../primitives/nodes';
|
|
3
|
+
import { type PlyrLayoutProps } from './props';
|
|
4
|
+
export interface PlyrLayoutElementProps extends PlyrLayoutProps, PrimitivePropsWithRef<'div'> {
|
|
5
|
+
}
|
|
6
|
+
declare const PlyrLayout: React.ForwardRefExoticComponent<Omit<PlyrLayoutElementProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
7
|
+
export { PlyrLayout };
|
|
8
|
+
declare function PlyrAudioLayout(): React.JSX.Element;
|
|
9
|
+
declare namespace PlyrAudioLayout {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
export { PlyrAudioLayout };
|
|
13
|
+
declare function PlyrVideoLayout(): React.JSX.Element;
|
|
14
|
+
declare namespace PlyrVideoLayout {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
export { PlyrVideoLayout };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { FileDownloadInfo, PlyrControl, PlyrLayoutTranslations, PlyrMarker, ThumbnailSrc } from 'vidstack';
|
|
2
|
+
import type { PlyrLayoutIcons } from './icons';
|
|
3
|
+
import type { PlyrLayoutSlots } from './slots';
|
|
4
|
+
export declare const defaultPlyrLayoutProps: Omit<PlyrLayoutProps, 'icons' | 'slots' | 'posterFrame'>;
|
|
5
|
+
export interface PlyrLayoutProps {
|
|
6
|
+
/**
|
|
7
|
+
* The icons to be rendered and displayed inside the layout.
|
|
8
|
+
*/
|
|
9
|
+
icons: PlyrLayoutIcons;
|
|
10
|
+
/**
|
|
11
|
+
* The frame of the video to use as the poster. This only works with Remotion sources at the
|
|
12
|
+
* moment.
|
|
13
|
+
*/
|
|
14
|
+
posterFrame?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Press the video container to toggle play/pause.
|
|
17
|
+
*/
|
|
18
|
+
clickToPlay?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Double-press the video container to toggle fullscreen.
|
|
21
|
+
*/
|
|
22
|
+
clickToFullscreen?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The controls to be included in the layout and their order specified by the position in the
|
|
25
|
+
* array.
|
|
26
|
+
*/
|
|
27
|
+
controls?: PlyrControl[];
|
|
28
|
+
/**
|
|
29
|
+
* Whether the duration should be displayed. This is ignored if `toggleTime` is `true`.
|
|
30
|
+
*/
|
|
31
|
+
displayDuration?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the download URL and filename for the download button. The download button must be
|
|
34
|
+
* included in the `controls` prop for this to take effect.
|
|
35
|
+
*/
|
|
36
|
+
download?: FileDownloadInfo;
|
|
37
|
+
/**
|
|
38
|
+
* Points on the time slider which should be visually marked for the user.
|
|
39
|
+
*/
|
|
40
|
+
markers?: PlyrMarker[] | null;
|
|
41
|
+
/**
|
|
42
|
+
* Display the current time as a countdown rather than an incremental counter.
|
|
43
|
+
*/
|
|
44
|
+
invertTime?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The thumbnails resource.
|
|
47
|
+
*
|
|
48
|
+
* @see {@link https://www.vidstack.io/docs/wc/player/core-concepts/loading#thumbnails}
|
|
49
|
+
*/
|
|
50
|
+
thumbnails?: ThumbnailSrc;
|
|
51
|
+
/**
|
|
52
|
+
* Allow users to press to toggle the inverted time.
|
|
53
|
+
*/
|
|
54
|
+
toggleTime?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Translation map from english to your desired language for words used throughout the layout.
|
|
57
|
+
*/
|
|
58
|
+
translations?: Partial<PlyrLayoutTranslations> | null;
|
|
59
|
+
/**
|
|
60
|
+
* The time, in seconds, to seek when a user hits fast forward or rewind.
|
|
61
|
+
*/
|
|
62
|
+
seekTime?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The speed options to display in the UI.
|
|
65
|
+
*/
|
|
66
|
+
speed?: (string | number)[];
|
|
67
|
+
/**
|
|
68
|
+
* Provide additional content to be inserted in specific positions.
|
|
69
|
+
*/
|
|
70
|
+
slots?: PlyrLayoutSlots;
|
|
71
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type SlotPositions<Name extends string> = `before${Capitalize<Name>}` | Name | `after${Capitalize<Name>}`;
|
|
3
|
+
export type Slots<Names extends string> = {
|
|
4
|
+
[slotName in SlotPositions<Names>]?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export type PlyrLayoutSlotName = 'airPlayButton' | 'captionsButton' | 'currentTime' | 'download' | 'duration' | 'fastForwardButton' | 'fullscreenButton' | 'liveButton' | 'muteButton' | 'pipButton' | 'playButton' | 'playLargeButton' | 'poster' | 'restartButton' | 'rewindButton' | 'rewindButton' | 'settings' | 'settingsButton' | 'timeSlider' | 'volumeSlider' | 'settingsMenu';
|
|
7
|
+
export interface PlyrLayoutSlots extends Slots<PlyrLayoutSlotName> {
|
|
8
|
+
}
|
|
9
|
+
export declare function slot(name: PlyrLayoutSlotName, defaultValue: React.ReactNode): React.ReactNode;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const RemotionThumbnail: import("maverick.js").WriteSignal<import("react").LazyExoticComponent<import("react").ComponentType<any>> | null>;
|
|
2
|
+
export declare const RemotionSliderThumbnail: import("maverick.js").WriteSignal<import("react").LazyExoticComponent<import("react").ComponentType<any>> | null>;
|
|
3
|
+
export declare const RemotionPoster: import("maverick.js").WriteSignal<import("react").LazyExoticComponent<import("react").ComponentType<any>> | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLayoutName(name: string): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InferComponentEvents } from 'maverick.js';
|
|
2
|
+
import type { ReactEventCallbacks } from 'maverick.js/react';
|
|
3
|
+
import type { MediaPlayerInstance } from './primitives/instances';
|
|
4
|
+
type PlayerCallbacks = keyof ReactEventCallbacks<InferComponentEvents<MediaPlayerInstance>>;
|
|
5
|
+
export declare const playerCallbacks: PlayerCallbacks[];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ReactElementProps } from 'maverick.js/react';
|
|
3
|
+
import type { PlayerSrc } from '../source';
|
|
4
|
+
import { MediaPlayerInstance } from './primitives/instances';
|
|
5
|
+
export interface MediaPlayerProps extends Omit<ReactElementProps<MediaPlayerInstance>, 'src'> {
|
|
6
|
+
/**
|
|
7
|
+
* The URL or object of the current media resource/s to be considered for playback.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://vidstack.io/docs/player/core-concepts/loading#sources}
|
|
10
|
+
*/
|
|
11
|
+
src?: PlayerSrc;
|
|
12
|
+
aspectRatio?: string;
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
ref?: React.Ref<MediaPlayerInstance>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* All media components exist inside the `<MediaPlayer>` component. This component's main
|
|
19
|
+
* responsibilities are to manage media state updates, dispatch media events, handle media
|
|
20
|
+
* requests, and expose media state through HTML attributes and CSS properties for styling
|
|
21
|
+
* purposes.
|
|
22
|
+
*
|
|
23
|
+
* @docs {@link https://www.vidstack.io/docs/player/components/media/player}
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <MediaPlayer src="...">
|
|
27
|
+
* <MediaProvider />
|
|
28
|
+
* </MediaPlayer>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare const MediaPlayer: React.ForwardRefExoticComponent<Omit<MediaPlayerProps, "ref"> & React.RefAttributes<MediaPlayerInstance>>;
|
|
32
|
+
export { MediaPlayer };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { AirPlayButton, AudioGainSlider, CaptionButton, Captions, Controls, ControlsGroup, FullscreenButton, Gesture, GoogleCastButton, LiveButton, MediaAnnouncer, MediaPlayer, MediaProvider, Menu, MenuButton, MenuItem, MenuItems, MenuPortal, MuteButton, PIPButton, PlayButton, Poster, QualitySlider, Radio, RadioGroup, SeekButton, Slider, SliderChapters, SliderPreview, SliderThumbnail, SliderValue, SliderVideo, SpeedSlider, Thumbnail, Time, TimeSlider, ToggleButton, Tooltip, TooltipContent, TooltipTrigger, VolumeSlider } from 'vidstack';
|
|
2
|
+
export declare class MediaPlayerInstance extends MediaPlayer {
|
|
3
|
+
}
|
|
4
|
+
export declare class MediaProviderInstance extends MediaProvider {
|
|
5
|
+
}
|
|
6
|
+
export declare class MediaAnnouncerInstance extends MediaAnnouncer {
|
|
7
|
+
}
|
|
8
|
+
export declare class ControlsInstance extends Controls {
|
|
9
|
+
}
|
|
10
|
+
export declare class ControlsGroupInstance extends ControlsGroup {
|
|
11
|
+
}
|
|
12
|
+
export declare class ToggleButtonInstance extends ToggleButton {
|
|
13
|
+
}
|
|
14
|
+
export declare class CaptionButtonInstance extends CaptionButton {
|
|
15
|
+
}
|
|
16
|
+
export declare class FullscreenButtonInstance extends FullscreenButton {
|
|
17
|
+
}
|
|
18
|
+
export declare class LiveButtonInstance extends LiveButton {
|
|
19
|
+
}
|
|
20
|
+
export declare class MuteButtonInstance extends MuteButton {
|
|
21
|
+
}
|
|
22
|
+
export declare class PIPButtonInstance extends PIPButton {
|
|
23
|
+
}
|
|
24
|
+
export declare class PlayButtonInstance extends PlayButton {
|
|
25
|
+
}
|
|
26
|
+
export declare class AirPlayButtonInstance extends AirPlayButton {
|
|
27
|
+
}
|
|
28
|
+
export declare class GoogleCastButtonInstance extends GoogleCastButton {
|
|
29
|
+
}
|
|
30
|
+
export declare class SeekButtonInstance extends SeekButton {
|
|
31
|
+
}
|
|
32
|
+
export declare class TooltipInstance extends Tooltip {
|
|
33
|
+
}
|
|
34
|
+
export declare class TooltipTriggerInstance extends TooltipTrigger {
|
|
35
|
+
}
|
|
36
|
+
export declare class TooltipContentInstance extends TooltipContent {
|
|
37
|
+
}
|
|
38
|
+
export declare class SliderInstance extends Slider {
|
|
39
|
+
}
|
|
40
|
+
export declare class TimeSliderInstance extends TimeSlider {
|
|
41
|
+
}
|
|
42
|
+
export declare class VolumeSliderInstance extends VolumeSlider {
|
|
43
|
+
}
|
|
44
|
+
export declare class AudioGainSliderInstance extends AudioGainSlider {
|
|
45
|
+
}
|
|
46
|
+
export declare class SpeedSliderInstance extends SpeedSlider {
|
|
47
|
+
}
|
|
48
|
+
export declare class QualitySliderInstance extends QualitySlider {
|
|
49
|
+
}
|
|
50
|
+
export declare class SliderThumbnailInstance extends SliderThumbnail {
|
|
51
|
+
}
|
|
52
|
+
export declare class SliderValueInstance extends SliderValue {
|
|
53
|
+
}
|
|
54
|
+
export declare class SliderVideoInstance extends SliderVideo {
|
|
55
|
+
}
|
|
56
|
+
export declare class SliderPreviewInstance extends SliderPreview {
|
|
57
|
+
}
|
|
58
|
+
export declare class SliderChaptersInstance extends SliderChapters {
|
|
59
|
+
}
|
|
60
|
+
export declare class MenuInstance extends Menu {
|
|
61
|
+
}
|
|
62
|
+
export declare class MenuButtonInstance extends MenuButton {
|
|
63
|
+
}
|
|
64
|
+
export declare class MenuItemsInstance extends MenuItems {
|
|
65
|
+
}
|
|
66
|
+
export declare class MenuItemInstance extends MenuItem {
|
|
67
|
+
}
|
|
68
|
+
export declare class MenuPortalInstance extends MenuPortal {
|
|
69
|
+
}
|
|
70
|
+
export declare class RadioGroupInstance extends RadioGroup {
|
|
71
|
+
}
|
|
72
|
+
export declare class RadioInstance extends Radio {
|
|
73
|
+
}
|
|
74
|
+
export declare class CaptionsInstance extends Captions {
|
|
75
|
+
}
|
|
76
|
+
export declare class GestureInstance extends Gesture {
|
|
77
|
+
}
|
|
78
|
+
export declare class PosterInstance extends Poster {
|
|
79
|
+
}
|
|
80
|
+
export declare class ThumbnailInstance extends Thumbnail {
|
|
81
|
+
}
|
|
82
|
+
export declare class TimeInstance extends Time {
|
|
83
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const NODES: readonly ["button", "div", "span", "img", "video", "audio"];
|
|
3
|
+
export declare const Primitive: Primitives;
|
|
4
|
+
type PropsWithoutRef<P> = P extends any ? 'ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P : P;
|
|
5
|
+
export type ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<React.ComponentProps<T>>;
|
|
6
|
+
type Primitives = {
|
|
7
|
+
[E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
|
|
8
|
+
};
|
|
9
|
+
export type PrimitivePropsWithRef<E extends React.ElementType> = Omit<React.ComponentProps<E>, 'style'> & React.Attributes & {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
style?: React.CSSProperties | (React.CSSProperties & Record<`--${string}`, string | null | undefined>) | undefined;
|
|
12
|
+
};
|
|
13
|
+
interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface SlotProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
|
6
|
+
declare const Slottable: ({ children }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
declare const Root: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export { Slot, Slottable, Root };
|
|
11
|
+
export type { SlotProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ReactElementProps } from 'maverick.js/react';
|
|
3
|
+
import { type MediaProviderLoader } from 'vidstack';
|
|
4
|
+
import { MediaProviderInstance } from './primitives/instances';
|
|
5
|
+
export interface MediaProviderProps extends Omit<ReactElementProps<MediaProviderInstance>, 'loaders'> {
|
|
6
|
+
loaders?: Array<{
|
|
7
|
+
new (): MediaProviderLoader;
|
|
8
|
+
}>;
|
|
9
|
+
iframeProps?: React.IframeHTMLAttributes<HTMLIFrameElement>;
|
|
10
|
+
mediaProps?: React.HTMLAttributes<HTMLMediaElement>;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
ref?: React.Ref<MediaProviderInstance>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders the current provider at this component location.
|
|
16
|
+
*
|
|
17
|
+
* @docs {@link https://www.vidstack.io/docs/player/components/media/provider}
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <MediaPlayer src="...">
|
|
21
|
+
* <MediaProvider />
|
|
22
|
+
* </MediaPlayer>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare const MediaProvider: React.ForwardRefExoticComponent<Omit<MediaProviderProps, "ref"> & React.RefAttributes<MediaProviderInstance>>;
|
|
26
|
+
export { MediaProvider };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { CaptionsFileFormat, CaptionsParserFactory } from 'media-captions';
|
|
2
|
+
import type { VTTContent } from 'vidstack';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new `TextTrack` object and adds it to the player.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link https://www.vidstack.io/docs/player/api/text-tracks}
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <MediaPlayer>
|
|
10
|
+
* <MediaProvider>
|
|
11
|
+
* <Track
|
|
12
|
+
* src="english.vtt"
|
|
13
|
+
* kind="subtitles"
|
|
14
|
+
* label="English"
|
|
15
|
+
* lang="en-US"
|
|
16
|
+
* default
|
|
17
|
+
* />
|
|
18
|
+
* </MediaProvider>
|
|
19
|
+
* </MediaPlayer>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function Track({ lang, ...props }: TrackProps): null;
|
|
23
|
+
declare namespace Track {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TrackProps {
|
|
27
|
+
/**
|
|
28
|
+
* A unique identifier.
|
|
29
|
+
*
|
|
30
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/id}
|
|
31
|
+
*/
|
|
32
|
+
readonly id?: string;
|
|
33
|
+
/**
|
|
34
|
+
* URL of the text track resource. This attribute must be specified and its URL value must have
|
|
35
|
+
* the same origin as the document — unless the <audio> or <video> parent element of the track
|
|
36
|
+
* element has a `crossorigin` attribute.
|
|
37
|
+
*/
|
|
38
|
+
readonly src?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Used to directly pass in text track file contents.
|
|
41
|
+
*/
|
|
42
|
+
readonly content?: string | VTTContent;
|
|
43
|
+
/**
|
|
44
|
+
* The captions file format to be parsed or a custom parser factory (functions that returns a
|
|
45
|
+
* captions parser). Supported types include: 'vtt', 'srt', 'ssa', 'ass', and 'json'.
|
|
46
|
+
*
|
|
47
|
+
* @defaultValue 'vtt'
|
|
48
|
+
*/
|
|
49
|
+
readonly type?: 'json' | CaptionsFileFormat | CaptionsParserFactory;
|
|
50
|
+
/**
|
|
51
|
+
* The text encoding type to be used when decoding data bytes to text.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue 'utf-8'
|
|
54
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings}
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
readonly encoding?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Indicates that the track should be enabled unless the user's preferences indicate that
|
|
60
|
+
* another track is more appropriate. This may only be used on one track element per media
|
|
61
|
+
* element.
|
|
62
|
+
*
|
|
63
|
+
* @defaultValue false
|
|
64
|
+
*/
|
|
65
|
+
readonly default?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* The kind of text track this object represents. This decides how the track will be handled
|
|
68
|
+
* by the player.
|
|
69
|
+
*
|
|
70
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/kind}
|
|
71
|
+
*/
|
|
72
|
+
readonly kind: TextTrackKind;
|
|
73
|
+
/**
|
|
74
|
+
* A human-readable label for the text track. This will be displayed to the user.
|
|
75
|
+
*
|
|
76
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/label}
|
|
77
|
+
*/
|
|
78
|
+
readonly label?: string;
|
|
79
|
+
/**
|
|
80
|
+
* A string containing a language identifier. For example, `"en-US"` for United States English
|
|
81
|
+
* or `"pt-BR"` for Brazilian Portuguese.
|
|
82
|
+
*
|
|
83
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/language}
|
|
84
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc5646}
|
|
85
|
+
*/
|
|
86
|
+
readonly language?: string;
|
|
87
|
+
/**
|
|
88
|
+
* A string containing a language identifier. For example, `"en-US"` for United States English
|
|
89
|
+
* or `"pt-BR"` for Brazilian Portuguese. This is a short alias for `language`.
|
|
90
|
+
*
|
|
91
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/language}
|
|
92
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc5646}
|
|
93
|
+
*/
|
|
94
|
+
readonly lang?: TrackProps['language'];
|
|
95
|
+
/**
|
|
96
|
+
* React list key.
|
|
97
|
+
*/
|
|
98
|
+
readonly key?: string;
|
|
99
|
+
}
|
|
100
|
+
export { Track };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ReactElementProps } from 'maverick.js/react';
|
|
3
|
+
import { AirPlayButtonInstance } from '../../primitives/instances';
|
|
4
|
+
export interface AirPlayButtonProps extends ReactElementProps<AirPlayButtonInstance, HTMLButtonElement> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A button for requesting to connect to Apple AirPlay.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link https://www.apple.com/au/airplay}
|
|
13
|
+
* @docs {@link https://www.vidstack.io/docs/player/components/buttons/airplay-button}
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <AirPlayButton>
|
|
17
|
+
* <AirPlayIcon />
|
|
18
|
+
* </AirPlayButton>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare const AirPlayButton: React.ForwardRefExoticComponent<Omit<AirPlayButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export { AirPlayButton };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ReactElementProps } from 'maverick.js/react';
|
|
3
|
+
import { CaptionButtonInstance } from '../../primitives/instances';
|
|
4
|
+
export interface CaptionButtonProps extends ReactElementProps<CaptionButtonInstance, HTMLButtonElement> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A button for toggling the showing state of the captions.
|
|
11
|
+
*
|
|
12
|
+
* @docs {@link https://www.vidstack.io/docs/player/components/buttons/caption-button}
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const track = useMediaState('textTrack'),
|
|
16
|
+
* isOn = track && isTrackCaptionKind(track);
|
|
17
|
+
*
|
|
18
|
+
* <CaptionButton>
|
|
19
|
+
* {isOn ? <OnIcon /> : <OffIcon />}
|
|
20
|
+
* </CaptionButton>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare const CaptionButton: React.ForwardRefExoticComponent<Omit<CaptionButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
export { CaptionButton };
|