(null);
useEffect(() => {
if (!audioVideo) {
return;
}
audioVideo.bindVideoElement(tileId, videoEl.current);
return () => audioVideo.unbindVideoElement(tileId);
}, [audioVideo, tileId]);
return (
);
}
```
### Building a Roster
_Note_ - You will need to have provided `meetingManager.getAttendee` with a function to fetch your attendee names, otherwise there will be no names in the roster. See the [MeetingManager documentation](/docs/sdk-providers-meetingmanager--page) for more information.
```jsx
import { useRosterState, useAttendeeStatus } from 'amazon-chime-sdk-component-library-react';
const MyMeetingRoster = () => {
const { roster } = useRosterState();
const attendees = Object.values(roster);
const attendeeItems = attendees.map((attendee) => {
const { id, name } = attendee;
return ;
});
return (
{ attendeeItems }
)
}
const MyRosterCell = ({ name, attendeeId }) => {
const { videoEnabled, sharingContent, muted } = useAttendeeStatus(attendeeId);
return (
{ name }
{muted ?
: }
{sharingContent ? : }
{videoEnabled ? : }
);
}
```
### Building a grid for remote attendee videos
```jsx
import {
useRemoteVideoTileState,
RemoteVideo,
} from 'amazon-chime-sdk-component-library-react';
const MyVideoGrid = () => {
const { tiles } = useRemoteVideoTileState();
const videos = tiles.map((tileId) => );
return (
{tiles.length ? videos : 'No remote videos available'}
);
};
```