{#snippet videoTile(tile: VideoTileData, layout: TileLayoutVariant)} {@const media = $mediaStateByIdentity(tile.liveKitIdentity)} {@const label = labelFor(tile.liveKitIdentity, tile.source)}
{#if tile.track} {:else}
{/if} {#if tile.track}
{/if} {label}{tile.isLocal ? " (you)" : ""} {#if videoTiles.length > 1} {@const pinned = $videoPrimaryTileKey === tileKey(tile)} {/if}
{/snippet} {#snippet videoPanelBody()} {#if showTileGrid} {#if useSpotlightLayout && primaryTile}
{@render videoTile(primaryTile, "spotlight")} {#if secondaryTiles.length > 0}
{#each secondaryTiles as tile (tileKey(tile))} {@render videoTile(tile, "strip")} {/each}
{/if}
{:else if useMultiGrid}
{#if tileGrid}
{#each tileGrid.rows as row, rowIndex (rowIndex)} {@const offset = tileGrid.rows .slice(0, rowIndex) .reduce((sum, r) => sum + r.columnCount, 0)}
{#each videoTiles.slice(offset, offset + row.columnCount) as tile (tileKey(tile))}
{@render videoTile(tile, "default")}
{/each}
{/each}
{/if}
{/if} {:else}

Waiting for participants…

{/if} {/snippet} {#if showVideoContent} {#if mobile}
{@render videoPanelBody()}
{:else}
{@render videoPanelBody()}
{/if} {/if}