Skip to content

🎥 Make videos programmatically with React

Merge branch 'main' into lambda-testing

Jonny Burgere3a28b69f080
diff --cc packages/player/src/Player.tsx
index 769105218e,4728f30224..101ed9756b
--- a/packages/player/src/Player.tsx
+++ b/packages/player/src/Player.tsx
@@@ -61,10 -61,19 +61,19 @@@ export type PlayerProps<T> =
CompProps<T>;
Internals.CSSUtils.injectCSS(
- Internals.CSSUtils.makeDefaultCSS(`.${PLAYER_CSS_CLASSNAME}`)
+ Internals.CSSUtils.makeDefaultCSS(`.${PLAYER_CSS_CLASSNAME}`, '#fff')
);
- // eslint-disable-next-line complexity
+ export const componentOrNullIfLazy = <T,>(
+ props: CompProps<T>
+ ): LooseAnyComponent<T> | null => {
+ if ('component' in props) {
+ return props.component as LooseAnyComponent<T>;
+ }
+
+ return null;
+ };
+
export const PlayerFn = <T,>(
{
durationInFrames,