steep-balloon-41261
09/05/2023, 11:56 PMthousands-nightfall-15914
09/06/2023, 6:33 AMVideoTrack wrapper component is as follows:
interface Props {
participant: LocalParticipant | RemoteParticipant;
source: Track.Source;
}
export default function ParticipantVideoView(props: Props) {
const showTrack =
props.source === Track.Source.ScreenShare
? props.participant.isScreenShareEnabled
: props.participant.isCameraEnabled;
return showTrack ? (
<VideoTrack
className="absolute inset-0 w-full h-full object-cover"
participant={props.participant}
source={props.source}
/>
) : (
<ParticipantVideoPlaceholer participant={props.participant} />
);
}thousands-nightfall-15914
09/06/2023, 6:39 AMuseParticipants) and rendering ^ wrapper views in a couple different places ā a grid displaying a subset of the participants and an hscroll displaying all participants. we see the issue @chilly-army-38675 described in both placeseager-zoo-16408
09/06/2023, 9:19 AMTrackLoop. A working example is our VideoConference component (here).thousands-nightfall-15914
09/06/2023, 3:36 PMuseParticipants hook once at the top of the page/component tree, and individual components grab them from the store as necessary. a couple of other quirks that probably aren't relevant, but sharing just in case:
⢠the hscroll I mentioned that displays all participants also allows the host to take actions on participants, such as reordering, muting, and removing from the room. these actions make use of identity, sid, and metadata
⢠we also use metadata and isMicrophoneEnabled to overlay participant info on the video tracks shown in our grid
as you mentioned, due to ^ it was convenient to model around participants, but I'm sure we can reorient around tracks as necessary. thanks again!thousands-nightfall-15914
09/06/2023, 6:57 PMuseTracks for useParticipants seems to have fixed things. thanks again for the help