Video Output - {video?.name || 'No Video Selected'} Broadcast your local camera to remote viewers in rooms
{#if error} Broadcasting Error {error} {/if}
Current Video Output
{#if video?.hasOutput} Broadcasting {:else} Not Broadcasting {/if}
{#if video?.hasOutput}
{#if video.output.roomId} Room: {video.output.roomId} {:else} Broadcasting to server {/if}
{/if}
{#if !video?.canOutput} Requirements
{#if !video?.hasInput}
No video input connected
{:else if video.input.type !== 'local-camera'}
Input must be local camera (cannot re-broadcast remote streams)
{/if}
To enable output, first connect to your local camera in the Video Input modal.
{/if} {#if video?.hasOutput} Broadcasting

Streaming to Server

{#if video.output.roomId}

Room ID: {video.output.roomId}

{/if}

Source: Local Camera

{#if video.input.stream}

Video: {video.input.stream.getVideoTracks().length} tracks

Audio: {video.input.stream.getAudioTracks().length} tracks

{/if}
{/if}
Remote Broadcasting (Rooms) Broadcast your camera feed to remote viewers in rooms
{#if video?.hasOutput}

Broadcasting Active

Sending video to remote viewers

{:else if video?.canOutput}

Create New Room

Create a room to broadcast your camera feed

Join Existing Room: {videoManager.rooms.length} room{videoManager.rooms.length !== 1 ? 's' : ''} available
{#if videoManager.rooms.length === 0}
{videoManager.roomsLoading ? 'Loading rooms...' : 'No rooms available. Create one to get started.'}
{:else} {#each videoManager.rooms as room}

{room.id}

{room.participants?.producer ? '🔴 Occupied' : '🟢 Available'} 👥 {room.participants?.consumers?.length || 0} viewers
{#if !room.participants?.producer} {:else} {/if}
{/each} {/if}
{#if video?.hasOutput}

Stop current broadcast to join a different room

{/if} {:else}
Connect to local camera first to enable broadcasting
{/if}
Video Broadcasting Requirements: Local camera input only • Remote streams: Cannot be re-broadcasted • Only one output per room