@videojs/react 0.1.0-preview.2
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/LICENSE +20 -0
- package/README.md +28 -0
- package/dist/FrostedSkin-t8edr5LV.d.ts +13 -0
- package/dist/FrostedSkin-t8edr5LV.d.ts.map +1 -0
- package/dist/MinimalSkin-DzHkJgW-.d.ts +13 -0
- package/dist/MinimalSkin-DzHkJgW-.d.ts.map +1 -0
- package/dist/VolumeSlider-DoR6idnJ.js +905 -0
- package/dist/VolumeSlider-DoR6idnJ.js.map +1 -0
- package/dist/frosted-BtDBmsH2.js +163 -0
- package/dist/frosted-BtDBmsH2.js.map +1 -0
- package/dist/icons-BqfV81R8.js +316 -0
- package/dist/icons-BqfV81R8.js.map +1 -0
- package/dist/icons.d.ts +71 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/icons.js +3 -0
- package/dist/index-BNR1awZq.d.ts +36 -0
- package/dist/index-BNR1awZq.d.ts.map +1 -0
- package/dist/index.d.ts +341 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +87 -0
- package/dist/index.js.map +1 -0
- package/dist/minimal-DE2x_liR.js +167 -0
- package/dist/minimal-DE2x_liR.js.map +1 -0
- package/dist/skins/frosted.css +4 -0
- package/dist/skins/frosted.d.ts +2 -0
- package/dist/skins/frosted.js +6 -0
- package/dist/skins/minimal.css +4 -0
- package/dist/skins/minimal.d.ts +2 -0
- package/dist/skins/minimal.js +6 -0
- package/dist/store-DpQF8Ges.js +124 -0
- package/dist/store-DpQF8Ges.js.map +1 -0
- package/dist/store.d.ts +2 -0
- package/dist/store.js +3 -0
- package/package.json +79 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { a as useMediaDispatch, c as useMediaStore, i as MediaProvider, l as MediaContext, n as MediaStateOwner, o as useMediaRef, r as MediaStore, s as useMediaSelector, t as MediaState } from "./index-BNR1awZq.js";
|
|
2
|
+
import { t as FrostedSkin } from "./FrostedSkin-t8edr5LV.js";
|
|
3
|
+
import { t as MinimalSkin } from "./MinimalSkin-DzHkJgW-.js";
|
|
4
|
+
import React$1, { CSSProperties, DetailedHTMLProps, ElementType, FC, HTMLProps, MutableRefObject, PropsWithChildren, ReactElement, ReactNode, Ref, RefCallback, VideoHTMLAttributes } from "react";
|
|
5
|
+
import { Placement } from "@floating-ui/react";
|
|
6
|
+
import { TimeSlider as TimeSlider$1, VolumeSlider as VolumeSlider$1 } from "@videojs/core";
|
|
7
|
+
|
|
8
|
+
//#region src/utils/component-factory.d.ts
|
|
9
|
+
|
|
10
|
+
type RenderFn<TProps = any, TState = any> = (props: TProps, state: TState) => ReactElement;
|
|
11
|
+
/**
|
|
12
|
+
* Type helper to infer the component type from the factory
|
|
13
|
+
*/
|
|
14
|
+
type ConnectedComponent<TProps extends Record<string, any>, TRenderFn extends RenderFn<any, any>> = React.ForwardRefExoticComponent<React.PropsWithoutRef<TProps & {
|
|
15
|
+
render?: TRenderFn;
|
|
16
|
+
}> & React.RefAttributes<HTMLElement>>;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/CurrentTimeDisplay.d.ts
|
|
19
|
+
declare function useCurrentTimeDisplayState(_props: any): {
|
|
20
|
+
currentTime: number;
|
|
21
|
+
duration: number;
|
|
22
|
+
};
|
|
23
|
+
type CurrentTimeDisplayState = ReturnType<typeof useCurrentTimeDisplayState>;
|
|
24
|
+
interface CurrentTimeDisplayProps extends React.ComponentProps<"span"> {
|
|
25
|
+
showRemaining?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare function renderCurrentTimeDisplay(props: CurrentTimeDisplayProps, state: CurrentTimeDisplayState): JSX.Element;
|
|
28
|
+
declare const CurrentTimeDisplay: ConnectedComponent<CurrentTimeDisplayProps, typeof renderCurrentTimeDisplay>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/components/DurationDisplay.d.ts
|
|
31
|
+
declare function useDurationDisplayState(_props: any): {
|
|
32
|
+
duration: number;
|
|
33
|
+
};
|
|
34
|
+
type useDurationDisplayState = typeof useDurationDisplayState;
|
|
35
|
+
type DurationDisplayState = ReturnType<useDurationDisplayState>;
|
|
36
|
+
declare function useDurationDisplayProps(props: PropsWithChildren): PropsWithChildren<Record<string, unknown>>;
|
|
37
|
+
type useDurationDisplayProps = typeof useDurationDisplayProps;
|
|
38
|
+
type DurationDisplayProps = ReturnType<useDurationDisplayProps>;
|
|
39
|
+
declare function renderDurationDisplay(props: DurationDisplayProps, state: DurationDisplayState): JSX.Element;
|
|
40
|
+
type renderDurationDisplay = typeof renderDurationDisplay;
|
|
41
|
+
declare const DurationDisplay: ConnectedComponent<DurationDisplayProps, typeof renderDurationDisplay>;
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/FullscreenButton.d.ts
|
|
44
|
+
declare function useFullscreenButtonState(_props: any): {
|
|
45
|
+
fullscreen: boolean;
|
|
46
|
+
requestEnterFullscreen: () => void;
|
|
47
|
+
requestExitFullscreen: () => void;
|
|
48
|
+
};
|
|
49
|
+
type FullscreenButtonState = ReturnType<typeof useFullscreenButtonState>;
|
|
50
|
+
declare function getFullscreenButtonProps(props: PropsWithChildren, state: FullscreenButtonState): PropsWithChildren<Record<string, unknown>>;
|
|
51
|
+
type FullscreenButtonProps = ReturnType<typeof getFullscreenButtonProps>;
|
|
52
|
+
declare function renderFullscreenButton(props: FullscreenButtonProps, state: FullscreenButtonState): JSX.Element;
|
|
53
|
+
declare const FullscreenButton: ConnectedComponent<FullscreenButtonProps, typeof renderFullscreenButton>;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/MediaContainer.d.ts
|
|
56
|
+
/**
|
|
57
|
+
* Hook to associate a React element as the fullscreen container for the media store.
|
|
58
|
+
* This is equivalent to Media Chrome's useMediaFullscreenRef but for VJS-10.
|
|
59
|
+
*
|
|
60
|
+
* The ref callback will register the element as the container state owner
|
|
61
|
+
* in the media store, enabling fullscreen functionality.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* import { useMediaContainerRef } from '@videojs/react';
|
|
65
|
+
*
|
|
66
|
+
* const PlayerContainer = ({ children }) => {
|
|
67
|
+
* const containerRef = useMediaContainerRef();
|
|
68
|
+
* return <div ref={containerRef}>{children}</div>;
|
|
69
|
+
* };
|
|
70
|
+
*/
|
|
71
|
+
declare function useMediaContainerRef(): RefCallback<HTMLElement | null>;
|
|
72
|
+
/**
|
|
73
|
+
* MediaContainer component that automatically registers itself as the fullscreen container.
|
|
74
|
+
* This provides a simple wrapper component for fullscreen functionality.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* import { MediaContainer } from '@videojs/react';
|
|
78
|
+
*
|
|
79
|
+
* const MyPlayer = () => (
|
|
80
|
+
* <MediaContainer>
|
|
81
|
+
* <video src="video.mp4" />
|
|
82
|
+
* <div>Controls here</div>
|
|
83
|
+
* </MediaContainer>
|
|
84
|
+
* );
|
|
85
|
+
*/
|
|
86
|
+
declare const MediaContainer: FC<PropsWithChildren<HTMLProps<HTMLDivElement> & {
|
|
87
|
+
portalId?: string;
|
|
88
|
+
}>>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/components/MuteButton.d.ts
|
|
91
|
+
declare function useMuteButtonState(_props: any): {
|
|
92
|
+
volumeLevel: string;
|
|
93
|
+
muted: boolean;
|
|
94
|
+
requestMute: () => void;
|
|
95
|
+
requestUnmute: () => void;
|
|
96
|
+
};
|
|
97
|
+
type MuteButtonState = ReturnType<typeof useMuteButtonState>;
|
|
98
|
+
declare function getMuteButtonProps(props: PropsWithChildren, state: MuteButtonState): PropsWithChildren<Record<string, unknown>>;
|
|
99
|
+
type MuteButtonProps = ReturnType<typeof getMuteButtonProps>;
|
|
100
|
+
declare function renderMuteButton(props: MuteButtonProps, state: MuteButtonState): JSX.Element;
|
|
101
|
+
declare const MuteButton: ConnectedComponent<MuteButtonProps, typeof renderMuteButton>;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/PlayButton.d.ts
|
|
104
|
+
declare function usePlayButtonState(_props: any): {
|
|
105
|
+
paused: boolean;
|
|
106
|
+
requestPlay: () => void;
|
|
107
|
+
requestPause: () => void;
|
|
108
|
+
};
|
|
109
|
+
type PlayButtonState = ReturnType<typeof usePlayButtonState>;
|
|
110
|
+
declare function getPlayButtonProps(props: Record<string, unknown>, state: PlayButtonState): PropsWithChildren<Record<string, unknown>>;
|
|
111
|
+
type PlayButtonProps = ReturnType<typeof getPlayButtonProps>;
|
|
112
|
+
declare function renderPlayButton(props: PlayButtonProps, state: PlayButtonState): JSX.Element;
|
|
113
|
+
declare const PlayButton: ConnectedComponent<PlayButtonProps, typeof renderPlayButton>;
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/components/Popover.d.ts
|
|
116
|
+
interface PopoverRootProps {
|
|
117
|
+
openOnHover?: boolean;
|
|
118
|
+
delay?: number;
|
|
119
|
+
closeDelay?: number;
|
|
120
|
+
children: ReactNode;
|
|
121
|
+
}
|
|
122
|
+
interface PopoverTriggerProps {
|
|
123
|
+
children: ReactNode;
|
|
124
|
+
}
|
|
125
|
+
interface PopoverPositionerProps {
|
|
126
|
+
side?: Placement;
|
|
127
|
+
sideOffset?: number;
|
|
128
|
+
children: ReactNode;
|
|
129
|
+
}
|
|
130
|
+
interface PopoverPopupProps {
|
|
131
|
+
className?: string;
|
|
132
|
+
children: ReactNode;
|
|
133
|
+
}
|
|
134
|
+
interface PopoverPortalProps {
|
|
135
|
+
children: ReactNode;
|
|
136
|
+
root?: HTMLElement | ShadowRoot | MutableRefObject<HTMLElement | ShadowRoot | null> | null;
|
|
137
|
+
rootId?: string;
|
|
138
|
+
}
|
|
139
|
+
declare function PopoverRoot({
|
|
140
|
+
openOnHover,
|
|
141
|
+
delay,
|
|
142
|
+
closeDelay,
|
|
143
|
+
children
|
|
144
|
+
}: PopoverRootProps): JSX.Element;
|
|
145
|
+
declare function PopoverTrigger({
|
|
146
|
+
children
|
|
147
|
+
}: PopoverTriggerProps): JSX.Element;
|
|
148
|
+
declare function PopoverPositioner({
|
|
149
|
+
side,
|
|
150
|
+
sideOffset,
|
|
151
|
+
children
|
|
152
|
+
}: PopoverPositionerProps): JSX.Element | null;
|
|
153
|
+
declare function PopoverPopup({
|
|
154
|
+
className,
|
|
155
|
+
children
|
|
156
|
+
}: PopoverPopupProps): JSX.Element;
|
|
157
|
+
declare function PopoverPortal({
|
|
158
|
+
children,
|
|
159
|
+
root,
|
|
160
|
+
rootId
|
|
161
|
+
}: PopoverPortalProps): JSX.Element;
|
|
162
|
+
declare const Popover: {
|
|
163
|
+
Root: typeof PopoverRoot;
|
|
164
|
+
Trigger: typeof PopoverTrigger;
|
|
165
|
+
Positioner: typeof PopoverPositioner;
|
|
166
|
+
Popup: typeof PopoverPopup;
|
|
167
|
+
Portal: typeof PopoverPortal;
|
|
168
|
+
};
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/components/PreviewTimeDisplay.d.ts
|
|
171
|
+
declare function usePreviewTimeDisplayState(_props: any): {
|
|
172
|
+
previewTime: number;
|
|
173
|
+
};
|
|
174
|
+
type PreviewTimeDisplayState = ReturnType<typeof usePreviewTimeDisplayState>;
|
|
175
|
+
interface PreviewTimeDisplayProps extends React.ComponentProps<"span"> {
|
|
176
|
+
showRemaining?: boolean;
|
|
177
|
+
}
|
|
178
|
+
declare function renderPreviewTimeDisplay(props: PreviewTimeDisplayProps, state: PreviewTimeDisplayState): JSX.Element;
|
|
179
|
+
declare const PreviewTimeDisplay: ConnectedComponent<PreviewTimeDisplayProps, typeof renderPreviewTimeDisplay>;
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/components/SimpleVideo.d.ts
|
|
182
|
+
type SimpleVideoProps = PropsWithChildren<DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement> & {
|
|
183
|
+
className?: string | undefined;
|
|
184
|
+
style?: CSSProperties | undefined;
|
|
185
|
+
}>;
|
|
186
|
+
/**
|
|
187
|
+
* SimpleVideo - A basic video component that works with native HTML5 video formats (MP4, WebM, etc.)
|
|
188
|
+
* without using a playback engine. Use this for simple MP4 files. For HLS/DASH streaming, use the
|
|
189
|
+
* regular Video component instead.
|
|
190
|
+
*
|
|
191
|
+
* This component connects to MediaProvider for play/pause state but sets the src directly on the
|
|
192
|
+
* video element without going through HLS.js or other playback engines.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```tsx
|
|
196
|
+
* <MediaProvider>
|
|
197
|
+
* <MediaSkin>
|
|
198
|
+
* <SimpleVideo src="video.mp4" />
|
|
199
|
+
* </MediaSkin>
|
|
200
|
+
* </MediaProvider>
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
declare const SimpleVideo: React$1.ForwardRefExoticComponent<SimpleVideoProps & React$1.RefAttributes<HTMLVideoElement>>;
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/components/TimeSlider.d.ts
|
|
206
|
+
interface TimeSliderProps extends React.ComponentPropsWithRef<"div"> {
|
|
207
|
+
orientation?: "horizontal" | "vertical";
|
|
208
|
+
}
|
|
209
|
+
interface TimeSliderRenderProps extends React.ComponentProps<"div"> {
|
|
210
|
+
"data-orientation"?: "horizontal" | "vertical";
|
|
211
|
+
"data-current-time"?: number;
|
|
212
|
+
"data-duration"?: number;
|
|
213
|
+
}
|
|
214
|
+
declare function renderTimeSliderRoot(props: TimeSliderRenderProps): JSX.Element;
|
|
215
|
+
declare const TimeSliderRoot: ConnectedComponent<TimeSliderProps, typeof renderTimeSliderRoot>;
|
|
216
|
+
declare function renderTimeSliderTrack(props: TimeSliderRenderProps): JSX.Element;
|
|
217
|
+
declare const TimeSliderTrack: ConnectedComponent<React.ComponentProps<"div">, typeof renderTimeSliderTrack>;
|
|
218
|
+
declare function renderTimeSliderThumb(props: TimeSliderRenderProps): JSX.Element;
|
|
219
|
+
declare const TimeSliderThumb: ConnectedComponent<React.ComponentProps<"div">, typeof renderTimeSliderThumb>;
|
|
220
|
+
declare function renderTimeSliderPointer(props: TimeSliderRenderProps): JSX.Element;
|
|
221
|
+
declare const TimeSliderPointer: ConnectedComponent<React.ComponentProps<"div">, typeof renderTimeSliderPointer>;
|
|
222
|
+
declare function renderTimeSliderProgress(props: TimeSliderRenderProps): JSX.Element;
|
|
223
|
+
declare const TimeSliderProgress: ConnectedComponent<React.ComponentProps<"div">, typeof renderTimeSliderProgress>;
|
|
224
|
+
declare const TimeSlider: {
|
|
225
|
+
Root: typeof TimeSliderRoot;
|
|
226
|
+
Track: typeof TimeSliderTrack;
|
|
227
|
+
Thumb: typeof TimeSliderThumb;
|
|
228
|
+
Pointer: typeof TimeSliderPointer;
|
|
229
|
+
Progress: typeof TimeSliderProgress;
|
|
230
|
+
};
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region src/components/Tooltip.d.ts
|
|
233
|
+
interface TooltipRootProps {
|
|
234
|
+
delay?: number;
|
|
235
|
+
closeDelay?: number;
|
|
236
|
+
children: ReactNode;
|
|
237
|
+
trackCursorAxis?: "x" | "y" | "both";
|
|
238
|
+
}
|
|
239
|
+
interface TooltipTriggerProps {
|
|
240
|
+
children: ReactNode;
|
|
241
|
+
}
|
|
242
|
+
interface TooltipPositionerProps {
|
|
243
|
+
side?: Placement;
|
|
244
|
+
sideOffset?: number;
|
|
245
|
+
collisionPadding?: number;
|
|
246
|
+
children: ReactNode;
|
|
247
|
+
}
|
|
248
|
+
interface TooltipPopupProps {
|
|
249
|
+
className?: string;
|
|
250
|
+
children: ReactNode;
|
|
251
|
+
}
|
|
252
|
+
interface TooltipArrowProps {
|
|
253
|
+
className?: string;
|
|
254
|
+
children: ReactNode;
|
|
255
|
+
}
|
|
256
|
+
interface TooltipPortalProps {
|
|
257
|
+
children: ReactNode;
|
|
258
|
+
root?: HTMLElement | ShadowRoot | MutableRefObject<HTMLElement | ShadowRoot | null> | null;
|
|
259
|
+
rootId?: string;
|
|
260
|
+
}
|
|
261
|
+
declare function TooltipRoot({
|
|
262
|
+
delay,
|
|
263
|
+
closeDelay,
|
|
264
|
+
trackCursorAxis,
|
|
265
|
+
children
|
|
266
|
+
}: TooltipRootProps): JSX.Element;
|
|
267
|
+
declare function TooltipTrigger({
|
|
268
|
+
children
|
|
269
|
+
}: TooltipTriggerProps): JSX.Element;
|
|
270
|
+
declare function TooltipPositioner({
|
|
271
|
+
side,
|
|
272
|
+
sideOffset,
|
|
273
|
+
collisionPadding,
|
|
274
|
+
children
|
|
275
|
+
}: TooltipPositionerProps): JSX.Element | null;
|
|
276
|
+
declare function TooltipPopup({
|
|
277
|
+
className,
|
|
278
|
+
children
|
|
279
|
+
}: TooltipPopupProps): JSX.Element | null;
|
|
280
|
+
declare function TooltipArrow({
|
|
281
|
+
className,
|
|
282
|
+
children
|
|
283
|
+
}: TooltipArrowProps): JSX.Element;
|
|
284
|
+
declare function TooltipPortal({
|
|
285
|
+
children,
|
|
286
|
+
root,
|
|
287
|
+
rootId
|
|
288
|
+
}: TooltipPortalProps): JSX.Element;
|
|
289
|
+
declare const Tooltip: {
|
|
290
|
+
Root: typeof TooltipRoot;
|
|
291
|
+
Trigger: typeof TooltipTrigger;
|
|
292
|
+
Positioner: typeof TooltipPositioner;
|
|
293
|
+
Popup: typeof TooltipPopup;
|
|
294
|
+
Arrow: typeof TooltipArrow;
|
|
295
|
+
Portal: typeof TooltipPortal;
|
|
296
|
+
};
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/components/Video.d.ts
|
|
299
|
+
type MediaStateOwner$1 = NonNullable<Parameters<ReturnType<typeof useMediaRef>>[0]>;
|
|
300
|
+
/** @TODO Improve type inference and narrowing/widening for different use cases (CJP) */
|
|
301
|
+
type ComponentType = ElementType<Omit<DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "ref"> & {
|
|
302
|
+
ref: Ref<MediaStateOwner$1>;
|
|
303
|
+
}>;
|
|
304
|
+
type VideoProps = PropsWithChildren<{
|
|
305
|
+
component?: ComponentType;
|
|
306
|
+
className?: string | undefined;
|
|
307
|
+
style?: CSSProperties | undefined;
|
|
308
|
+
}>;
|
|
309
|
+
declare function Video({
|
|
310
|
+
component,
|
|
311
|
+
children,
|
|
312
|
+
...props
|
|
313
|
+
}: VideoProps): JSX.Element;
|
|
314
|
+
declare const MediaElementVideo: FC<VideoProps>;
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region src/components/VolumeSlider.d.ts
|
|
317
|
+
interface VolumeSliderProps extends React.ComponentProps<"div"> {
|
|
318
|
+
orientation?: "horizontal" | "vertical";
|
|
319
|
+
}
|
|
320
|
+
interface VolumeSliderRenderProps extends React.ComponentProps<"div"> {
|
|
321
|
+
"data-orientation"?: "horizontal" | "vertical";
|
|
322
|
+
"data-muted"?: boolean;
|
|
323
|
+
"data-volume-level"?: string;
|
|
324
|
+
}
|
|
325
|
+
declare function renderVolumeSliderRoot(props: VolumeSliderRenderProps): JSX.Element;
|
|
326
|
+
declare const VolumeSliderRoot: ConnectedComponent<VolumeSliderProps, typeof renderVolumeSliderRoot>;
|
|
327
|
+
declare function renderVolumeSliderTrack(props: VolumeSliderRenderProps): JSX.Element;
|
|
328
|
+
declare const VolumeSliderTrack: ConnectedComponent<React.ComponentProps<"div">, typeof renderVolumeSliderTrack>;
|
|
329
|
+
declare function renderVolumeSliderThumb(props: VolumeSliderRenderProps): JSX.Element;
|
|
330
|
+
declare const VolumeSliderThumb: ConnectedComponent<React.ComponentProps<"div">, typeof renderVolumeSliderThumb>;
|
|
331
|
+
declare function renderVolumeSliderProgress(props: VolumeSliderRenderProps): JSX.Element;
|
|
332
|
+
declare const VolumeSliderProgress: ConnectedComponent<React.ComponentProps<"div">, typeof renderVolumeSliderProgress>;
|
|
333
|
+
declare const VolumeSlider: {
|
|
334
|
+
Root: typeof VolumeSliderRoot;
|
|
335
|
+
Track: typeof VolumeSliderTrack;
|
|
336
|
+
Thumb: typeof VolumeSliderThumb;
|
|
337
|
+
Progress: typeof VolumeSliderProgress;
|
|
338
|
+
};
|
|
339
|
+
//#endregion
|
|
340
|
+
export { CurrentTimeDisplay, DurationDisplay, FrostedSkin, FullscreenButton, MediaContainer, MediaContext, MediaElementVideo, MediaProvider, MediaState, MediaStateOwner, MediaStore, MinimalSkin, MuteButton, PlayButton, Popover, PreviewTimeDisplay, SimpleVideo, TimeSlider, Tooltip, Video, VolumeSlider, useMediaContainerRef, useMediaDispatch, useMediaRef, useMediaSelector, useMediaStore };
|
|
341
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["CurrentTimeDisplay: ConnectedComponent<CurrentTimeDisplayProps, typeof renderCurrentTimeDisplay>","DurationDisplay: ConnectedComponent<DurationDisplayProps, typeof renderDurationDisplay>","FullscreenButton: ConnectedComponent<FullscreenButtonProps, typeof renderFullscreenButton>","MediaContainer: FC<PropsWithChildren<HTMLProps<HTMLDivElement> & { portalId?: string }>>","MuteButton: ConnectedComponent<MuteButtonProps, typeof renderMuteButton>","PlayButton: ConnectedComponent<PlayButtonProps, typeof renderPlayButton>","Popover: {\n Root: typeof PopoverRoot;\n Trigger: typeof PopoverTrigger;\n Positioner: typeof PopoverPositioner;\n Popup: typeof PopoverPopup;\n Portal: typeof PopoverPortal;\n}","PreviewTimeDisplay: ConnectedComponent<PreviewTimeDisplayProps, typeof renderPreviewTimeDisplay>","SimpleVideo: React.ForwardRefExoticComponent<\n SimpleVideoProps & React.RefAttributes<HTMLVideoElement>\n>","TimeSliderRoot: ConnectedComponent<TimeSliderProps, typeof renderTimeSliderRoot>","TimeSliderTrack: ConnectedComponent<React.ComponentProps<'div'>, typeof renderTimeSliderTrack>","TimeSliderThumb: ConnectedComponent<React.ComponentProps<'div'>, typeof renderTimeSliderThumb>","TimeSliderPointer: ConnectedComponent<\n React.ComponentProps<'div'>,\n typeof renderTimeSliderPointer\n>","TimeSliderProgress: ConnectedComponent<\n React.ComponentProps<'div'>,\n typeof renderTimeSliderProgress\n>","Tooltip: {\n Root: typeof TooltipRoot;\n Trigger: typeof TooltipTrigger;\n Positioner: typeof TooltipPositioner;\n Popup: typeof TooltipPopup;\n Arrow: typeof TooltipArrow;\n Portal: typeof TooltipPortal;\n}","MediaElementVideo: FC<VideoProps>","VolumeSliderRoot: ConnectedComponent<VolumeSliderProps, typeof renderVolumeSliderRoot>","VolumeSliderTrack: ConnectedComponent<\n React.ComponentProps<'div'>,\n typeof renderVolumeSliderTrack\n>","VolumeSliderThumb: ConnectedComponent<\n React.ComponentProps<'div'>,\n typeof renderVolumeSliderThumb\n>","VolumeSliderProgress: ConnectedComponent<\n React.ComponentProps<'div'>,\n typeof renderVolumeSliderProgress\n>"],"sources":["../src/utils/component-factory.tsx","../src/components/CurrentTimeDisplay.tsx","../src/components/DurationDisplay.tsx","../src/components/FullscreenButton.tsx","../src/components/MediaContainer.tsx","../src/components/MuteButton.tsx","../src/components/PlayButton.tsx","../src/components/Popover.tsx","../src/components/PreviewTimeDisplay.tsx","../src/components/SimpleVideo.tsx","../src/components/TimeSlider.tsx","../src/components/Tooltip.tsx","../src/components/Video.tsx","../src/components/VolumeSlider.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAW0E,KAA9D,QAA8D,CAAW,SAAA,GAAA,EAAA,SAAA,GAAA,CA0CrF,GAAY,CAAA,KAAA,EA1C+C,MA0C/C,EAAA,KAAA,EA1C8D,MA0C9D,EAAA,GA1CyE,YA0CzE;;;;ACZkG,KDYlG,kBCZkG,CAY9G,eDA8C,MCAjCA,CAAAA,MAAuE,EAAA,GAAA,CAAA,EAAhC,kBDAiC,QCAjC,CAAA,GAAA,EAAA,GAAA,CAAA,CAAgC,GDAuB,KAAA,CAAM,yBCA7B,CDClF,KAAA,CAAM,eCD4E,CDC5D,MCD4D,GAAA;EAAnD,MAAA,CAAA,EDCW,SCDX;CAAA,CAAA,GDC0B,KAAA,CAAM,aCDhC,CDC8C,WCD9C,CAAA,CAAA;;;iBA5CjB,0BAAA;;;;KAcJ,uBAAA,GAA0B,kBAAkB;UAEvC,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,OYoJ/F,gBZpJ+F;EAAA,KAAA,EAAA,OYqJ9F,iBZrJ8F;EAY9G,KAAanB,EAAAA,OY0IG,iBZ1IoE;EAAhC,QAAA,EAAA,OY2IjC,oBZ3IiC;CAAgC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { a as useMediaStore, i as useMediaSelector, n as useMediaDispatch, o as MediaContext, r as useMediaRef, t as MediaProvider } from "./store-DpQF8Ges.js";
|
|
2
|
+
import { _ as DurationDisplay, a as TimeSlider, c as Popover, f as MuteButton, g as FullscreenButton, h as useMediaContainerRef, m as MediaContainer, o as PreviewTimeDisplay, r as Tooltip, t as VolumeSlider, u as PlayButton, v as CurrentTimeDisplay } from "./VolumeSlider-DoR6idnJ.js";
|
|
3
|
+
import "./icons-BqfV81R8.js";
|
|
4
|
+
import { t as FrostedSkin } from "./frosted-BtDBmsH2.js";
|
|
5
|
+
import { t as MinimalSkin } from "./minimal-DE2x_liR.js";
|
|
6
|
+
import React, { forwardRef, useImperativeHandle, useRef } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { createMediaPlaybackController } from "@videojs/core/media";
|
|
9
|
+
|
|
10
|
+
//#region src/components/SimpleVideo.tsx
|
|
11
|
+
/**
|
|
12
|
+
* SimpleVideo - A basic video component that works with native HTML5 video formats (MP4, WebM, etc.)
|
|
13
|
+
* without using a playback engine. Use this for simple MP4 files. For HLS/DASH streaming, use the
|
|
14
|
+
* regular Video component instead.
|
|
15
|
+
*
|
|
16
|
+
* This component connects to MediaProvider for play/pause state but sets the src directly on the
|
|
17
|
+
* video element without going through HLS.js or other playback engines.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <MediaProvider>
|
|
22
|
+
* <MediaSkin>
|
|
23
|
+
* <SimpleVideo src="video.mp4" />
|
|
24
|
+
* </MediaSkin>
|
|
25
|
+
* </MediaProvider>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
const SimpleVideo = forwardRef(({ children,...props }, _ref) => {
|
|
29
|
+
const mediaRefCallback = useMediaRef();
|
|
30
|
+
return /* @__PURE__ */ jsx("video", {
|
|
31
|
+
...props,
|
|
32
|
+
ref: mediaRefCallback,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
SimpleVideo.displayName = "SimpleVideo";
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/Video.tsx
|
|
40
|
+
function useMediaStateOwner(ref, createMediaPlaybackController$1) {
|
|
41
|
+
const mediaStateOwnerRef = useRef(createMediaPlaybackController$1());
|
|
42
|
+
useImperativeHandle(ref, () => mediaStateOwnerRef.current, []);
|
|
43
|
+
return { updateMediaElement(mediaEl, props) {
|
|
44
|
+
mediaStateOwnerRef.current.mediaElement = mediaEl ?? void 0;
|
|
45
|
+
mediaStateOwnerRef.current.src = props.src;
|
|
46
|
+
if (props.muted) mediaStateOwnerRef.current.muted = props.muted;
|
|
47
|
+
} };
|
|
48
|
+
}
|
|
49
|
+
const DefaultVideoComponent = forwardRef(({ children,...props }, ref) => {
|
|
50
|
+
const { updateMediaElement } = useMediaStateOwner(ref, createMediaPlaybackController);
|
|
51
|
+
return /* @__PURE__ */ jsx("video", {
|
|
52
|
+
...props,
|
|
53
|
+
ref: (mediaEl) => {
|
|
54
|
+
/** @TODO In later iterations/non-POC, we should be able to have a function that can be used directly for the `ref` prop (CJP) */
|
|
55
|
+
updateMediaElement(mediaEl, props);
|
|
56
|
+
},
|
|
57
|
+
children
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* @description This is a "thin wrapper" around the media component whose primary responsibility is to wire up the element
|
|
62
|
+
* to the <MediaProvider/>'s MediaStore for the media state.
|
|
63
|
+
* @param props - Identical to both a <video/>'s props and the <Player/> props, with one addition that may be familiar to
|
|
64
|
+
* MUI users: a `component` prop that allows you to use something other than the <video/> element under the hood.
|
|
65
|
+
* @returns A media react component (e.g. <video/>), wired up as the media element.
|
|
66
|
+
*/
|
|
67
|
+
function ConnectedVideo({ component, children,...props }) {
|
|
68
|
+
const Component = component;
|
|
69
|
+
const mediaRefCallback = useMediaRef();
|
|
70
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
71
|
+
...props,
|
|
72
|
+
ref: mediaRefCallback,
|
|
73
|
+
children
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function Video({ component = DefaultVideoComponent, children,...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(ConnectedVideo, {
|
|
78
|
+
...props,
|
|
79
|
+
component,
|
|
80
|
+
children
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const MediaElementVideo = Video;
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
export { CurrentTimeDisplay, DurationDisplay, FrostedSkin, FullscreenButton, MediaContainer, MediaContext, MediaElementVideo, MediaProvider, MinimalSkin, MuteButton, PlayButton, Popover, PreviewTimeDisplay, SimpleVideo, TimeSlider, Tooltip, Video, VolumeSlider, useMediaContainerRef, useMediaDispatch, useMediaRef, useMediaSelector, useMediaStore };
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["SimpleVideo: React.ForwardRefExoticComponent<\n SimpleVideoProps & React.RefAttributes<HTMLVideoElement>\n>","createMediaPlaybackController","DefaultVideoComponent: ElementType<\n Omit<DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'ref'> & { ref: Ref<any> }\n>","MediaElementVideo: FC<VideoProps>"],"sources":["../src/components/SimpleVideo.tsx","../src/components/Video.tsx"],"sourcesContent":["'use client';\n\nimport type {\n CSSProperties,\n DetailedHTMLProps,\n PropsWithChildren,\n VideoHTMLAttributes,\n} from 'react';\n\nimport React, { forwardRef } from 'react';\nimport { useMediaRef } from '@/store';\n\nexport type SimpleVideoProps = PropsWithChildren<\n DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement> & {\n className?: string | undefined;\n style?: CSSProperties | undefined;\n }\n>;\n\n/**\n * SimpleVideo - A basic video component that works with native HTML5 video formats (MP4, WebM, etc.)\n * without using a playback engine. Use this for simple MP4 files. For HLS/DASH streaming, use the\n * regular Video component instead.\n *\n * This component connects to MediaProvider for play/pause state but sets the src directly on the\n * video element without going through HLS.js or other playback engines.\n *\n * @example\n * ```tsx\n * <MediaProvider>\n * <MediaSkin>\n * <SimpleVideo src=\"video.mp4\" />\n * </MediaSkin>\n * </MediaProvider>\n * ```\n */\nexport const SimpleVideo: React.ForwardRefExoticComponent<\n SimpleVideoProps & React.RefAttributes<HTMLVideoElement>\n> = forwardRef<HTMLVideoElement, SimpleVideoProps>(\n ({ children, ...props }, _ref) => {\n const mediaRefCallback = useMediaRef();\n\n return (\n // eslint-disable-next-line jsx-a11y/media-has-caption\n <video {...props} ref={mediaRefCallback}>\n {children}\n </video>\n );\n },\n);\n\nSimpleVideo.displayName = 'SimpleVideo';\n\nexport default SimpleVideo;\n","'use client';\n\nimport type {\n CSSProperties,\n DetailedHTMLProps,\n ElementType,\n FC,\n PropsWithChildren,\n Ref,\n VideoHTMLAttributes,\n} from 'react';\n\nimport { createMediaPlaybackController } from '@videojs/core/media';\n\nimport { forwardRef, useImperativeHandle, useRef } from 'react';\nimport { useMediaRef } from '@/store';\n\nexport interface MuxVideoProps {\n 'playback-id'?: string;\n}\n\ntype MediaStateOwner = NonNullable<Parameters<ReturnType<typeof useMediaRef>>[0]>;\n\n/** @TODO Improve type inference and narrowing/widening for different use cases (CJP) */\ntype ComponentType = ElementType<\n Omit<DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'ref'> & {\n ref: Ref<MediaStateOwner>;\n }\n>;\n\n// These are the first steps/WIP POC of decoupling the Media State Owner from the DOM.\n// Note that everything will still work if you use:\n// 1. an audio/video element directly\n// 2. a custom element a la media-elements\ntype CreateMediaStateOwner = typeof createMediaPlaybackController;\n\nfunction useMediaStateOwner(ref: Ref<any>, createMediaPlaybackController: CreateMediaStateOwner) {\n const mediaStateOwnerRef = useRef(createMediaPlaybackController(/* props? */));\n useImperativeHandle(ref, () => mediaStateOwnerRef.current, []);\n /** @TODO Parameterize this (CJP) */\n type ComponentProps = DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;\n return {\n updateMediaElement(mediaEl: HTMLMediaElement | null, props: ComponentProps) {\n // NOTE: The details here will almost definitely change for a less \"bare bones\"/\"POC\" implementation of Media State Owner impl. (CJP)\n mediaStateOwnerRef.current.mediaElement = mediaEl ?? undefined;\n mediaStateOwnerRef.current.src = props.src as string;\n if (props.muted) {\n mediaStateOwnerRef.current.muted = props.muted;\n }\n },\n };\n}\n\nconst DefaultVideoComponent: ElementType<\n Omit<DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'ref'> & { ref: Ref<any> }\n> = forwardRef<any, any>(({ children, ...props }, ref) => {\n const { updateMediaElement } = useMediaStateOwner(ref, createMediaPlaybackController);\n return (\n // eslint-disable-next-line jsx-a11y/media-has-caption\n <video\n {...props}\n ref={(mediaEl) => {\n /** @TODO In later iterations/non-POC, we should be able to have a function that can be used directly for the `ref` prop (CJP) */\n updateMediaElement(mediaEl, props);\n }}\n >\n {children}\n </video>\n );\n});\n\n/**\n * @description This is a \"thin wrapper\" around the media component whose primary responsibility is to wire up the element\n * to the <MediaProvider/>'s MediaStore for the media state.\n * @param props - Identical to both a <video/>'s props and the <Player/> props, with one addition that may be familiar to\n * MUI users: a `component` prop that allows you to use something other than the <video/> element under the hood.\n * @returns A media react component (e.g. <video/>), wired up as the media element.\n */\nfunction ConnectedVideo({\n component,\n children,\n ...props\n}: PropsWithChildren<{\n component: ComponentType;\n className?: string | undefined;\n style?: CSSProperties | undefined;\n}>) {\n const Component = component;\n const mediaRefCallback = useMediaRef();\n // NOTE: While this may feel like magic to folks, in the \"default\" use case, you can think of it as:\n // return (<video ref={mediaRefCallback} {...restProps} >{children}</video>);\n return (\n <Component {...props} ref={mediaRefCallback}>\n {children}\n </Component>\n );\n}\n\nexport type VideoProps = PropsWithChildren<{\n component?: ComponentType;\n className?: string | undefined;\n style?: CSSProperties | undefined;\n}>;\n\n// Main Video component with default component\nexport function Video({ component = DefaultVideoComponent, children, ...props }: VideoProps): JSX.Element {\n return (\n <ConnectedVideo {...props} component={component}>\n {children}\n </ConnectedVideo>\n );\n}\n\n// MediaElementVideo export (same as Video but for backwards compatibility)\nexport const MediaElementVideo: FC<VideoProps> = Video;\n\nexport default Video;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAaA,cAET,YACD,EAAE,SAAU,GAAG,SAAS,SAAS;CAChC,MAAM,mBAAmB,aAAa;AAEtC,QAEE,oBAAC;EAAM,GAAI;EAAO,KAAK;EACpB;GACK;EAGb;AAED,YAAY,cAAc;;;;ACf1B,SAAS,mBAAmB,KAAe,iCAAsD;CAC/F,MAAM,qBAAqB,OAAOC,iCAA2C,CAAC;AAC9E,qBAAoB,WAAW,mBAAmB,SAAS,EAAE,CAAC;AAG9D,QAAO,EACL,mBAAmB,SAAkC,OAAuB;AAE1E,qBAAmB,QAAQ,eAAe,WAAW;AACrD,qBAAmB,QAAQ,MAAM,MAAM;AACvC,MAAI,MAAM,MACR,oBAAmB,QAAQ,QAAQ,MAAM;IAG9C;;AAGH,MAAMC,wBAEF,YAAsB,EAAE,SAAU,GAAG,SAAS,QAAQ;CACxD,MAAM,EAAE,uBAAuB,mBAAmB,KAAK,8BAA8B;AACrF,QAEE,oBAAC;EACC,GAAI;EACJ,MAAM,YAAY;;AAEhB,sBAAmB,SAAS,MAAM;;EAGnC;GACK;EAEV;;;;;;;;AASF,SAAS,eAAe,EACtB,WACA,SACA,GAAG,SAKD;CACF,MAAM,YAAY;CAClB,MAAM,mBAAmB,aAAa;AAGtC,QACE,oBAAC;EAAU,GAAI;EAAO,KAAK;EACxB;GACS;;AAWhB,SAAgB,MAAM,EAAE,YAAY,uBAAuB,SAAU,GAAG,SAAkC;AACxG,QACE,oBAAC;EAAe,GAAI;EAAkB;EACnC;GACc;;AAKrB,MAAaC,oBAAoC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { _ as DurationDisplay, a as TimeSlider, d as PlayButton_default, g as FullscreenButton, i as Tooltip_default, l as Popover_default, m as MediaContainer, n as VolumeSlider_default, p as MuteButton_default, s as PreviewTimeDisplay_default, v as CurrentTimeDisplay } from "./VolumeSlider-DoR6idnJ.js";
|
|
2
|
+
import { a as Play_default, c as FullscreenExitAlt_default, n as VolumeLow_default, o as Pause_default, r as VolumeHigh_default, t as VolumeOff_default, u as FullscreenEnterAlt_default } from "./icons-BqfV81R8.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/skins/minimal/styles.ts
|
|
6
|
+
function cn(...classes) {
|
|
7
|
+
return classes.filter(Boolean).join(" ");
|
|
8
|
+
}
|
|
9
|
+
const styles = {
|
|
10
|
+
MediaContainer: cn("vjs", "vjs:relative vjs:isolate vjs:@container/root vjs:group/root vjs:overflow-clip vjs:bg-black", "vjs:text-[0.8125rem]", "vjs:after:absolute vjs:after:inset-0 vjs:after:ring-black/10 vjs:after:ring-1 vjs:dark:after:ring-white/10 vjs:after:ring-inset vjs:after:z-10 vjs:after:pointer-events-none vjs:after:rounded-[inherit]", "vjs:[&:fullscreen]:rounded-none vjs:[&:fullscreen]:[&_video]:h-full vjs:[&:fullscreen]:[&_video]:w-full", "vjs:[&_video]:rounded-[inherit] vjs:[&_video]:w-full vjs:[&_video]:h-auto"),
|
|
11
|
+
Overlay: cn("vjs:absolute vjs:inset-0 vjs:rounded-[inherit] vjs:pointer-events-none", "vjs:bg-gradient-to-t vjs:from-black/70 vjs:via-black/50 vjs:via-[120px] vjs:to-transparent", "vjs:opacity-0 vjs:delay-500 vjs:duration-300", "vjs:has-[+.controls_[data-paused]]:opacity-100 vjs:has-[+.controls_[data-paused]]:delay-0 vjs:has-[+.controls_[data-paused]]:duration-75", "vjs:has-[+.controls_[aria-expanded=\"true\"]]:opacity-100 vjs:has-[+.controls_[aria-expanded=\"true\"]]:delay-0 vjs:has-[+.controls_[aria-expanded=\"true\"]]:duration-75", "vjs:group-hover/root:opacity-100 vjs:group-hover/root:delay-0 vjs:group-hover/root:duration-75", "vjs:contrast-more:from-black/75"),
|
|
12
|
+
Controls: cn("controls", "vjs:@container/controls vjs:absolute vjs:inset-x-0 vjs:bottom-0 vjs:flex vjs:items-center vjs:gap-3.5 vjs:z-20 vjs:px-3 vjs:pb-3 vjs:pt-10 vjs:text-white", "vjs:transition vjs:ease-in-out", "vjs:translate-y-full vjs:opacity-0 vjs:delay-500 vjs:duration-300", "vjs:has-[[data-paused]]:translate-y-0 vjs:has-[[data-paused]]:opacity-100 vjs:has-[[data-paused]]:delay-0 vjs:has-[[data-paused]]:duration-75", "vjs:has-[[aria-expanded=\"true\"]]:translate-y-0 vjs:has-[[aria-expanded=\"true\"]]:opacity-100 vjs:has-[[aria-expanded=\"true\"]]:delay-0 vjs:has-[[aria-expanded=\"true\"]]:duration-75", "vjs:group-hover/root:translate-y-0 vjs:group-hover/root:opacity-100 vjs:group-hover/root:delay-0 vjs:group-hover/root:duration-75"),
|
|
13
|
+
Icon: cn("icon"),
|
|
14
|
+
Button: cn("vjs:group/button vjs:cursor-pointer vjs:relative vjs:shrink-0 vjs:transition vjs:select-none vjs:p-2.5 vjs:rounded-md", "vjs:bg-transparent vjs:text-white", "vjs:hover:text-white/80 vjs:focus-visible:text-white/80", "vjs:-outline-offset-2 vjs:focus-visible:outline-2 vjs:focus-visible:outline-offset-2 vjs:focus-visible:outline-white", "vjs:aria-disabled:grayscale vjs:aria-disabled:opacity-50 vjs:aria-disabled:cursor-not-allowed", "vjs:aria-busy:pointer-events-none vjs:aria-busy:cursor-not-allowed", "vjs:aria-expanded:text-white/80"),
|
|
15
|
+
ButtonGroup: cn("vjs:flex vjs:items-center vjs:gap-1.5"),
|
|
16
|
+
IconButton: cn("vjs:grid vjs:[&_.icon]:[grid-area:1/1]", "vjs:[&_.icon]:shrink-0 vjs:[&_.icon]:transition-[opacity,filter] vjs:[&_.icon]:duration-300 vjs:[&_.icon]:linear vjs:[&_.icon]:drop-shadow-[0_1px_0_var(--tw-shadow-color)] vjs:[&_.icon]:shadow-black/40"),
|
|
17
|
+
PlayButton: cn("vjs:[&_.pause-icon]:opacity-100 vjs:[&_.pause-icon]:blur-none vjs:[&[data-paused]_.pause-icon]:opacity-0 vjs:[&[data-paused]_.pause-icon]:blur-xs", "vjs:[&_.play-icon]:opacity-0 vjs:[&_.play-icon]:blur-xs vjs:[&[data-paused]_.play-icon]:opacity-100 vjs:[&[data-paused]_.play-icon]:blur-none"),
|
|
18
|
+
PlayIcon: cn("play-icon"),
|
|
19
|
+
PauseIcon: cn("pause-icon"),
|
|
20
|
+
PlayTooltipPopup: cn("vjs:[&_.pause-tooltip]:inline vjs:[&[data-paused]_.pause-tooltip]:hidden", "vjs:[&_.play-tooltip]:hidden vjs:[&[data-paused]_.play-tooltip]:inline"),
|
|
21
|
+
PlayTooltip: cn("play-tooltip"),
|
|
22
|
+
PauseTooltip: cn("pause-tooltip"),
|
|
23
|
+
MuteButton: cn("vjs:[&_.icon]:hidden", "vjs:[&[data-volume-level=\"high\"]_.volume-high-icon]:inline", "vjs:[&[data-volume-level=\"medium\"]_.volume-low-icon]:inline", "vjs:[&[data-volume-level=\"low\"]_.volume-low-icon]:inline", "vjs:[&[data-volume-level=\"off\"]_.volume-off-icon]:inline"),
|
|
24
|
+
VolumeHighIcon: cn("volume-high-icon"),
|
|
25
|
+
VolumeLowIcon: cn("volume-low-icon"),
|
|
26
|
+
VolumeOffIcon: cn("volume-off-icon"),
|
|
27
|
+
FullscreenButton: cn("vjs:[&_.fullscreen-enter-icon]:opacity-100 vjs:[&[data-fullscreen]_.fullscreen-enter-icon]:opacity-0", "vjs:[&_.fullscreen-exit-icon]:opacity-0 vjs:[&[data-fullscreen]_.fullscreen-exit-icon]:opacity-100", "vjs:[&_path]:transition-transform vjs:ease-out"),
|
|
28
|
+
FullscreenEnterIcon: cn("fullscreen-enter-icon", "vjs:group-hover/button:[&_.arrow-1]:translate-x-px vjs:group-hover/button:[&_.arrow-1]:-translate-y-px", "vjs:group-hover/button:[&_.arrow-2]:-translate-x-px vjs:group-hover/button:[&_.arrow-2]:translate-y-px"),
|
|
29
|
+
FullscreenExitIcon: cn("fullscreen-exit-icon", "vjs:[&_.arrow-1]:translate-x-px vjs:[&_.arrow-1]:-translate-y-px", "vjs:[&_.arrow-2]:-translate-x-px vjs:[&_.arrow-2]:translate-y-px", "vjs:group-hover/button:[&_.arrow-1]:translate-0", "vjs:group-hover/button:[&_.arrow-2]:translate-0"),
|
|
30
|
+
FullscreenTooltipPopup: cn("vjs:[&_.fullscreen-enter-tooltip]:inline vjs:[&[data-fullscreen]_.fullscreen-enter-tooltip]:hidden", "vjs:[&_.fullscreen-exit-tooltip]:hidden vjs:[&[data-fullscreen]_.fullscreen-exit-tooltip]:inline"),
|
|
31
|
+
FullscreenEnterTooltip: cn("fullscreen-enter-tooltip"),
|
|
32
|
+
FullscreenExitTooltip: cn("fullscreen-exit-tooltip"),
|
|
33
|
+
TimeSliderRoot: cn("vjs:mx-2"),
|
|
34
|
+
TimeDisplay: cn("vjs:tabular-nums vjs:text-shadow-2xs/20"),
|
|
35
|
+
DurationDisplay: cn("vjs:text-white/50 vjs:contents"),
|
|
36
|
+
SliderRoot: cn("vjs:flex vjs:items-center vjs:justify-center vjs:flex-1 vjs:group/slider vjs:relative vjs:rounded-sm", "vjs:[&[data-orientation=\"horizontal\"]]:h-5 vjs:[&[data-orientation=\"horizontal\"]]:min-w-20", "vjs:[&[data-orientation=\"vertical\"]]:w-5 vjs:[&[data-orientation=\"vertical\"]]:h-18", "vjs:-outline-offset-8 vjs:focus-visible:outline-2 vjs:focus-visible:outline-offset-8 vjs:focus-visible:outline-white"),
|
|
37
|
+
SliderTrack: cn("vjs:relative vjs:select-none vjs:rounded-full vjs:bg-white/10 vjs:transition-[height,width] vjs:ease-in-out", "vjs:[&[data-orientation=\"horizontal\"]]:w-full vjs:[&[data-orientation=\"horizontal\"]]:h-[0.1875rem]", "vjs:[&[data-orientation=\"vertical\"]]:w-[0.1875rem]"),
|
|
38
|
+
SliderProgress: cn("vjs:bg-white vjs:rounded-[inherit]"),
|
|
39
|
+
SliderPointer: cn("vjs:hidden"),
|
|
40
|
+
SliderThumb: cn("vjs:opacity-0 vjs:scale-70 vjs:group-hover/slider:opacity-100 vjs:group-hover/slider:scale-100 vjs:focus-visible:opacity-100 vjs:focus-visible:scale-100", "vjs:bg-white vjs:z-10 vjs:size-3 vjs:select-none vjs:ring vjs:ring-black/10 vjs:rounded-full vjs:shadow-sm vjs:shadow-black/15 vjs:transition-[opacity,scale] vjs:ease-out", "vjs:-outline-offset-2 vjs:focus-visible:outline-2 vjs:focus-visible:outline-offset-2 vjs:focus-visible:outline-amber-500", "vjs:[&[data-orientation=\"horizontal\"]]:hover:cursor-ew-resize", "vjs:[&[data-orientation=\"vertical\"]]:hover:cursor-ns-resize"),
|
|
41
|
+
PopupAnimation: cn("vjs:transition-[transform,scale,opacity,filter] vjs:origin-bottom vjs:duration-200 vjs:data-[instant]:duration-0", "vjs:data-[starting-style]:scale-0 vjs:data-[starting-style]:opacity-0 vjs:data-[starting-style]:blur-sm", "vjs:data-[ending-style]:scale-0 vjs:data-[ending-style]:opacity-0 vjs:data-[ending-style]:blur-sm"),
|
|
42
|
+
PopoverPopup: cn("vjs:py-2"),
|
|
43
|
+
TooltipPopup: cn("vjs:whitespace-nowrap vjs:flex vjs:flex-col vjs:rounded vjs:text-white vjs:text-xs vjs:@7xl/root:text-sm vjs:px-2 vjs:py-1 vjs:bg-white/20 vjs:backdrop-blur-3xl vjs:backdrop-saturate-150 vjs:backdrop-brightness-90 vjs:shadow-md vjs:shadow-black/5")
|
|
44
|
+
};
|
|
45
|
+
var styles_default = styles;
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/skins/minimal/MinimalSkin.tsx
|
|
49
|
+
function MinimalSkin({ children, className = "" }) {
|
|
50
|
+
return /* @__PURE__ */ jsxs(MediaContainer, {
|
|
51
|
+
className: `${styles_default.MediaContainer} ${className}`,
|
|
52
|
+
children: [
|
|
53
|
+
children,
|
|
54
|
+
/* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: styles_default.Overlay,
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsxs("div", {
|
|
59
|
+
className: styles_default.Controls,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsxs(Tooltip_default.Root, {
|
|
62
|
+
delay: 500,
|
|
63
|
+
closeDelay: 0,
|
|
64
|
+
children: [/* @__PURE__ */ jsx(Tooltip_default.Trigger, { children: /* @__PURE__ */ jsxs(PlayButton_default, {
|
|
65
|
+
className: `${styles_default.Button} ${styles_default.IconButton} ${styles_default.PlayButton}`,
|
|
66
|
+
children: [/* @__PURE__ */ jsx(Play_default, { className: `${styles_default.PlayIcon} ${styles_default.Icon}` }), /* @__PURE__ */ jsx(Pause_default, { className: `${styles_default.PauseIcon} ${styles_default.Icon}` })]
|
|
67
|
+
}) }), /* @__PURE__ */ jsx(Tooltip_default.Portal, { children: /* @__PURE__ */ jsx(Tooltip_default.Positioner, {
|
|
68
|
+
side: "top-start",
|
|
69
|
+
sideOffset: 6,
|
|
70
|
+
collisionPadding: 12,
|
|
71
|
+
children: /* @__PURE__ */ jsxs(Tooltip_default.Popup, {
|
|
72
|
+
className: `${styles_default.PopupAnimation} ${styles_default.TooltipPopup} ${styles_default.PlayTooltipPopup}`,
|
|
73
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: styles_default.PlayTooltip,
|
|
75
|
+
children: "Play"
|
|
76
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
77
|
+
className: styles_default.PauseTooltip,
|
|
78
|
+
children: "Pause"
|
|
79
|
+
})]
|
|
80
|
+
})
|
|
81
|
+
}) })]
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: "flex items-center gap-1",
|
|
85
|
+
children: [/* @__PURE__ */ jsx(CurrentTimeDisplay, { className: styles_default.TimeDisplay }), /* @__PURE__ */ jsxs("span", {
|
|
86
|
+
className: styles_default.DurationDisplay,
|
|
87
|
+
children: ["/", /* @__PURE__ */ jsx(DurationDisplay, { className: `${styles_default.TimeDisplay}` })]
|
|
88
|
+
})]
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsxs(Tooltip_default.Root, {
|
|
91
|
+
trackCursorAxis: "x",
|
|
92
|
+
children: [/* @__PURE__ */ jsx(Tooltip_default.Trigger, { children: /* @__PURE__ */ jsxs(TimeSlider.Root, {
|
|
93
|
+
className: styles_default.SliderRoot,
|
|
94
|
+
children: [/* @__PURE__ */ jsxs(TimeSlider.Track, {
|
|
95
|
+
className: styles_default.SliderTrack,
|
|
96
|
+
children: [/* @__PURE__ */ jsx(TimeSlider.Progress, { className: styles_default.SliderProgress }), /* @__PURE__ */ jsx(TimeSlider.Pointer, { className: styles_default.SliderPointer })]
|
|
97
|
+
}), /* @__PURE__ */ jsx(TimeSlider.Thumb, { className: styles_default.SliderThumb })]
|
|
98
|
+
}) }), /* @__PURE__ */ jsx(Tooltip_default.Portal, { children: /* @__PURE__ */ jsx(Tooltip_default.Positioner, {
|
|
99
|
+
side: "top",
|
|
100
|
+
sideOffset: 12,
|
|
101
|
+
collisionPadding: 12,
|
|
102
|
+
children: /* @__PURE__ */ jsx(Tooltip_default.Popup, {
|
|
103
|
+
className: `${styles_default.PopupAnimation} ${styles_default.TooltipPopup}`,
|
|
104
|
+
children: /* @__PURE__ */ jsx(PreviewTimeDisplay_default, { className: styles_default.TimeDisplay })
|
|
105
|
+
})
|
|
106
|
+
}) })]
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsxs("div", {
|
|
109
|
+
className: styles_default.ButtonGroup,
|
|
110
|
+
children: [/* @__PURE__ */ jsxs(Popover_default.Root, {
|
|
111
|
+
openOnHover: true,
|
|
112
|
+
delay: 200,
|
|
113
|
+
closeDelay: 300,
|
|
114
|
+
children: [/* @__PURE__ */ jsx(Popover_default.Trigger, { children: /* @__PURE__ */ jsxs(MuteButton_default, {
|
|
115
|
+
className: `${styles_default.Button} ${styles_default.IconButton} ${styles_default.MuteButton}`,
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsx(VolumeHigh_default, { className: `${styles_default.VolumeHighIcon} ${styles_default.Icon}` }),
|
|
118
|
+
/* @__PURE__ */ jsx(VolumeLow_default, { className: `${styles_default.VolumeLowIcon} ${styles_default.Icon}` }),
|
|
119
|
+
/* @__PURE__ */ jsx(VolumeOff_default, { className: `${styles_default.VolumeOffIcon} ${styles_default.Icon}` })
|
|
120
|
+
]
|
|
121
|
+
}) }), /* @__PURE__ */ jsx(Popover_default.Portal, { children: /* @__PURE__ */ jsx(Popover_default.Positioner, {
|
|
122
|
+
side: "top",
|
|
123
|
+
sideOffset: 2,
|
|
124
|
+
children: /* @__PURE__ */ jsx(Popover_default.Popup, {
|
|
125
|
+
className: `${styles_default.PopupAnimation} ${styles_default.PopoverPopup}`,
|
|
126
|
+
children: /* @__PURE__ */ jsxs(VolumeSlider_default.Root, {
|
|
127
|
+
className: styles_default.SliderRoot,
|
|
128
|
+
orientation: "vertical",
|
|
129
|
+
children: [/* @__PURE__ */ jsx(VolumeSlider_default.Track, {
|
|
130
|
+
className: styles_default.SliderTrack,
|
|
131
|
+
children: /* @__PURE__ */ jsx(VolumeSlider_default.Progress, { className: styles_default.SliderProgress })
|
|
132
|
+
}), /* @__PURE__ */ jsx(VolumeSlider_default.Thumb, { className: styles_default.SliderThumb })]
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
}) })]
|
|
136
|
+
}), /* @__PURE__ */ jsxs(Tooltip_default.Root, {
|
|
137
|
+
delay: 500,
|
|
138
|
+
closeDelay: 0,
|
|
139
|
+
children: [/* @__PURE__ */ jsx(Tooltip_default.Trigger, { children: /* @__PURE__ */ jsxs(FullscreenButton, {
|
|
140
|
+
className: `${styles_default.Button} ${styles_default.IconButton} ${styles_default.FullscreenButton}`,
|
|
141
|
+
children: [/* @__PURE__ */ jsx(FullscreenEnterAlt_default, { className: `${styles_default.FullscreenEnterIcon} ${styles_default.Icon}` }), /* @__PURE__ */ jsx(FullscreenExitAlt_default, { className: `${styles_default.FullscreenExitIcon} ${styles_default.Icon}` })]
|
|
142
|
+
}) }), /* @__PURE__ */ jsx(Tooltip_default.Portal, { children: /* @__PURE__ */ jsx(Tooltip_default.Positioner, {
|
|
143
|
+
side: "top-end",
|
|
144
|
+
sideOffset: 6,
|
|
145
|
+
collisionPadding: 12,
|
|
146
|
+
children: /* @__PURE__ */ jsxs(Tooltip_default.Popup, {
|
|
147
|
+
className: `${styles_default.PopupAnimation} ${styles_default.TooltipPopup} ${styles_default.FullscreenTooltipPopup}`,
|
|
148
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
149
|
+
className: styles_default.FullscreenEnterTooltip,
|
|
150
|
+
children: "Enter Fullscreen"
|
|
151
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
152
|
+
className: styles_default.FullscreenExitTooltip,
|
|
153
|
+
children: "Exit Fullscreen"
|
|
154
|
+
})]
|
|
155
|
+
})
|
|
156
|
+
}) })]
|
|
157
|
+
})]
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
})
|
|
161
|
+
]
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
//#endregion
|
|
166
|
+
export { MinimalSkin as t };
|
|
167
|
+
//# sourceMappingURL=minimal-DE2x_liR.js.map
|