GitHub

Source

VideoTrack

The VideoTrack component is responsible for rendering participant video tracks like camera and screen_share. This component must have access to the participant's context, or alternatively pass it a Participant as a property.

Import

import { VideoTrack } from "@livekit/components-react";

Usage

<VideoTrack trackRef={trackRef} />

Properties

manageSubscription?boolean

(Optional)

onSubscriptionStatusChanged?(subscribed: boolean) => void

(Optional)

onTrackClick?(evt: ParticipantClickEvent) => void

(Optional)

trackRef?TrackReference

(Optional) The track reference of the track to render.

deprecatedname?string

(Optional)

caution:

This property will be removed in a future version use trackRef instead.

deprecatedparticipant?Participant

(Optional)

caution:

This property will be removed in a future version use trackRef instead.

deprecatedpublication?TrackPublication

(Optional)

caution:

This property will be removed in a future version use trackRef instead.

deprecatedsource?Track.Source

(Optional)

caution:

This property will be removed in a future version use trackRef instead.