steep-balloon-41261
09/15/2023, 10:45 AMeager-zoo-16408
09/15/2023, 1:18 PMParticipantTile implementation
https://github.com/livekit/components-js/blob/e3453ca6bbcb6fa644ad1bd584d929b2e63dfcc9/packages/react/src/components/participant/ParticipantTile.tsx#L152-L193
and pass it to the ParticipantTile as a child. Then you could simply replace this with your own placeholder.eager-zoo-16408
09/15/2023, 1:20 PM<ParticipantTile>
<TrackRefContext.Consumer>
{(trackReference) => {
return (
<>
{isTrackReference(trackReference) &&
(trackReference.publication?.kind === 'video' ||
trackReference.source === Track.Source.Camera ||
trackReference.source === Track.Source.ScreenShare) ? (
<VideoTrack
trackRef={trackReference}
onSubscriptionStatusChanged={handleSubscribe}
manageSubscription={autoManageSubscription}
/>
) : (
isTrackReference(trackReference) && (
<AudioTrack
trackRef={trackReference}
onSubscriptionStatusChanged={handleSubscribe}
/>
)
)}
<div className="lk-participant-placeholder">
<ParticipantPlaceholder />
</div>
<div className="lk-participant-metadata">
<div className="lk-participant-metadata-item">
{trackReference.source === Track.Source.Camera ? (
<>
{isEncrypted && (
<LockLockedIcon style={{ marginRight: '0.25rem' }} />
)}
<TrackMutedIndicator
source={Track.Source.Microphone}
show={'muted'}
></TrackMutedIndicator>
<ParticipantName />
</>
) : (
<>
<ScreenShareIcon style={{ marginRight: '0.25rem' }} />
<ParticipantName>'s screen</ParticipantName>
</>
)}
</div>
<ConnectionQualityIndicator className="lk-participant-metadata-item" />
</div>
</>
);
}}
</TrackRefContext.Consumer>
</ParticipantTile>