DailyVideo
<DailyVideo sessionId={sessionId} />
The DailyVideo component renders a <video> tag for a given participant's sessionId and track type.
Props
| Parameter | Required | Type | Description |
|---|---|---|---|
sessionId | ✓ | string | The participant's session_id for which the video track should be played |
automirror | boolean | When enabled, mirrors a local participant's user-facing camera video. Defaults to false | |
fit | 'contain' | 'cover' | Determines whether the video should be fully contained or cover the element. See object-fit for details. Defaults to 'contain' | |
mirror | boolean | When set to true, video is mirrored. Defaults to false | |
playableStyle | Object | Inline styles to be applied, when the video is in a playable state. These will overwrite styles passed with the style prop. Use this to style the <video> differently when it's playing or not (e.g. when the participant's camera is muted or not). Defaults to {} | |
onResize | Function | Callback when the video element is resized. Reports the video's height, width and aspectRatio. | |
style | Object | Inline styles to be applied to the <video> element. Defaults to {} | |
type | 'video' | 'screenVideo' | The participant's track type to play. Defaults to 'video' |
DailyVideo also accepts any other React.VideoHTMLAttributes.
Data attributes
DailyVideo renders a couple of dynamic data attributes:
| Attribute | Description |
|---|---|
data-local | "true" in case the video comes from the local participant |
data-mirrored | "true" in case the video is mirrored, due to automirror or mirror |
data-playable | "true" in case the video is in a playable state |
data-session-id | Contains the corresponding sessionId |
data-subscribed | "true" or "staged" in case the video track is subscribed or staged |
data-video-type | Contains the corresponding type |