Video Tile
One participant of a call: their video or avatar, with their name, a live microphone meter and status badges.
c2-video-tile draws one participant of a call the way Meet, Zoom and Teams do: their video, or their avatar while the camera is off, a name pill with a live microphone meter, and badges for a raised hand, a pin and a weak connection. It connects to nothing: your call SDK supplies the stream and the state, and the tile draws them.
Import
import '@c2n/components/video-tile'Usage
Video
Set stream to the participant’s MediaStream. It plays in an inner <video> that is always muted: the call’s audio is yours to play, as with every call SDK, and playing it twice echoes. An SDK that attaches its own <video> element (LiveKit’s track.attach()) puts it in the default slot instead.
const tile = document.createElement('c2-video-tile')
tile.name = participant.name
tile.stream = new MediaStream([participant.videoTrack, participant.audioTrack])
tile.muted = !participant.audioEnabledWithout a live, enabled video track, or with video-off, the tile shows a c2-avatar of avatar-src or the name’s initials. local mirrors your own camera and adds “(You)” to the name; kind="screen" shows a screen share, fitted inside the tile, never mirrored, and named “Ana Ruiz’s screen”.
State
- Microphone. The name pill ends with a three-bar
c2-audio-visualizerof the stream’s audio, or oflevelwhen your SDK reports one.mutedreplaces it with a struck-through microphone. - Speaking.
speakingdraws the accent outline: set it from your SDK’s active speaker. Or setdetect-speaking, and the tile’s own meter decides. - Badges.
hand-raised,pinnedand afairorpoorconnectionadd their badges. Thebadgeslot adds your own (recording, host). - Actions. The
actionsslot shows on hover and focus, top right, for ac2-menuof tile actions such as “Pin” or “Mute for everyone”.
Accessibility
The tile is a group named by the participant and their state: “Ana Ruiz, muted, hand raised”. Speaking is not part of the name, since it changes several times a second. A hand raised after the tile appeared is announced once.