Skip to content

🎥 Make videos programmatically with React

Merge branch 'main' into v4

Jonny Burger6a920349cf16
diff --cc packages/player/src/Player.tsx
index a7498ed66d,6127169024..dc6a43a1a3
--- a/packages/player/src/Player.tsx
+++ b/packages/player/src/Player.tsx
@@@ -65,15 -64,15 +65,16 @@@ export type PlayerProps<Schema extends
renderPlayPauseButton?: RenderPlayPauseButton;
renderFullscreenButton?: RenderFullscreenButton;
alwaysShowControls?: boolean;
+ schema?: Schema;
+ initiallyMuted?: boolean;
-} & PropsIfHasProps<T> &
- CompProps<T>;
+} & CompProps<Props> &
+ PropsIfHasProps<Schema, Props>;
-export const componentOrNullIfLazy = <T,>(
- props: CompProps<T>
-): ComponentType<T> | null => {
+export const componentOrNullIfLazy = <Props,>(
+ props: CompProps<Props>
+): ComponentType<Props> | null => {
if ('component' in props) {
- return props.component as ComponentType<T>;
+ return props.component as ComponentType<Props>;
}
return null;
@@@ -112,8 -111,9 +113,9 @@@ const PlayerFn = <Schema extends z.ZodT
renderFullscreenButton,
renderPlayPauseButton,
alwaysShowControls = false,
+ initiallyMuted = false,
...componentProps
- }: PlayerProps<T>,
+ }: PlayerProps<Schema, Props>,
ref: MutableRefObject<PlayerRef>
) => {
if (typeof window !== 'undefined') {