Function CardVideoDisplay

CardVideoDisplay - A React functional component that displays a video stream with configurable display options.

This component renders a video element from a provided MediaStream, allowing options such as mirroring the video, setting a background color, and controlling whether the video fills the display area.

import React from 'react';
import { CardVideoDisplay } from 'mediasfu-reactjs';

function App() {
const mediaStream = new MediaStream(); // Example media stream

return (
<CardVideoDisplay
remoteProducerId="producer-123"
eventType="live"
forceFullDisplay={true}
videoStream={mediaStream}
backgroundColor="black"
doMirror={true}
/>
);
}

export default App;

Properties

propTypes?: any

Ignored by React.

Only kept in types for backwards compatibility. Will be removed in a future major release.

displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.


const MyComponent: FC = () => {
return <div>Hello!</div>
}

MyComponent.displayName = 'MyAwesomeComponent'