Video Tile
One participant of a call: their video or avatar, with their name, a live microphone meter and status badges.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
name | string | — | The participant's name. |
avatar-src | string | — | The picture on the camera-off surface. The name's initials without it. |
muted | boolean | false | The participant's microphone is off. |
video-off | boolean | false | The participant's camera is off, whatever stream holds. |
local | boolean | false | The reader's own tile: mirrored, and "(You)" after the name. |
kind | VideoTileKind | camera | camera, or screen for a screen share. |
speaking | boolean | false | The participant is speaking: the accent outline. |
detect-speaking | boolean | false | Lets the tile's own meter decide when the participant speaks, from stream or level. |
level | number | undefined | — | An audio level from 0 to 1 for the meter, for an SDK that reports one; stream wins over it. |
hand-raised | boolean | false | The participant raised a hand. |
pinned | boolean | false | The tile is pinned. |
connection | VideoTileConnection | good | Connection quality; fair and poor show signal bars. |
Slots
| Name | Description |
|---|---|
(default) | A <video> element the call SDK attached, used instead of stream. |
badge | More badges beside the hand and the pin, top left. |
actions | Buttons shown on hover and focus, top right: typically a c2-menu of tile actions. |
Events
| Name | Type | Description |
|---|---|---|
speaking-change | CustomEvent<{ speaking: boolean }> | Fired when the tile starts or stops showing the participant as speaking, from speaking or its own meter. Does not bubble. |
CSS parts
Shadow DOM styling hooks used with ::part(name). Prefer CSS custom properties when they cover the change.
| Name | Description |
|---|---|
video | The inner <video>. |
name | The name pill. |
surface | The camera-off surface around the avatar. |
CSS custom properties
Grouped by semantic target and state from --c2-<component>__<target>__<state>--<property>. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-video-tile--aspect-ratio | number | 16 / 9 | |
--c2-video-tile--border-radius | border-radius | 8px | |
--c2-video-tile--background | color | #27272a | Behind the video, seen around a screen share. |
--c2-video-tile__video--object-fit | string | cover | How a camera fills the tile. |
--c2-video-tile__screen--object-fit | string | contain | How a screen share fits the tile. |
--c2-video-tile__surface--background | color | light-dark(#e4e4e7, #27272a) | The camera-off surface. |
--c2-video-tile__avatar--size | pixel | clamp(20px, 28cqh, 96px) | The avatar on the camera-off surface. |
--c2-video-tile__name--background | color | rgba(0, 0, 0, 0.55) | |
--c2-video-tile__name--color | color | #ffffff | |
--c2-video-tile__name--font-size | font-size | 12px | |
--c2-video-tile__name--font-weight | font-weight | 500 | |
--c2-video-tile__name--border-radius | border-radius | 6px | |
--c2-video-tile__overlay--inset | pixel | 8px | Distance of the name pill and the badges from the edges. |
--c2-video-tile__speaking--color | color | rgb(2, 101, 220) | The outline of a speaking participant. |
--c2-video-tile__speaking--width | pixel | 3px | |
--c2-video-tile__badge--background | color | rgba(0, 0, 0, 0.55) | |
--c2-video-tile__badge--color | color | #ffffff | |
--c2-video-tile__hand--background | color | #fbbf24 | |
--c2-video-tile__hand--color | color | #1c1917 | |
--c2-video-tile__signal__fair--color | color | #fbbf24 | |
--c2-video-tile__signal__poor--color | color | #f87171 | |
Text and languages
The text the component shows, in English. It shows another language when the app adds one with addTranslations, under video-tile, and the nearest lang asks for it; any message not translated stays in English. {0}, {1}… stand for the values a message carries. Languages guide.
| Key | English | Values |
|---|---|---|
participant | Participant | — |
you | {0} (You) | {0} name |
screen | {0}'s screen | {0} name |
muted | muted | — |
handRaised | hand raised | — |
pinned | pinned | — |
fairConnection | unstable connection | — |
poorConnection | poor connection | — |
described | {0}, {1} | {0} name {1} states |
raisedHand | {0} raised a hand | {0} name |