diff --git a/src/ReactPlayer.tsx b/src/ReactPlayer.tsx index e8569194..efc4ad08 100644 --- a/src/ReactPlayer.tsx +++ b/src/ReactPlayer.tsx @@ -33,7 +33,7 @@ export const createReactPlayer = (players: PlayerEntry[], playerFallback: Player return null; }; - const ReactPlayer: ReactPlayer = React.forwardRef((_props, ref) => { + const ReactPlayer: ReactPlayer = React.forwardRef(({ children, ..._props } , ref) => { const props = merge(defaultProps, _props); const { src, slot, className, style, width, height, fallback, wrapper } = props; @@ -87,7 +87,7 @@ export const createReactPlayer = (players: PlayerEntry[], playerFallback: Player ? { display: 'block', width: '100%', height: '100%' } : { display: 'block', width, height, ...style }} config={config} - /> + >{children} ); };