Peer-to-peer video calls. No server: presence and call setup ride over
public nostr relays; audio/video flows directly over WebRTC.
network.join(n)} initial={network.savedName} />
) : (
You are {name} {' '}
{short(selfId)}{' '}
network.leave()}
disabled={inCall}
>
Leave
)}
{call?.phase === 'incoming' && (
{call.peerName} {' '}
{short(call.peerId)} wants to
start a video call with you.
network.accept()}>
Accept
{' '}
network.decline()}>
Decline
)}
{call?.phase === 'outgoing' && (
Calling {call.peerName} … waiting for them to
accept.
network.endCall()}>
Cancel
)}
{inCall && call && (
{(call.peerAudioMuted || call.peerVideoMuted) && (
{call.peerAudioMuted && (
)}
{call.peerVideoMuted && (
)}
)}
{call.phase === 'connected'
? call.screenStream
? `Sharing your screen with ${call.peerName}`
: `In a call with ${call.peerName}`
: `Connecting to ${call.peerName}…`}
network.setAudioMuted(!call.audioMuted)}
>
network.setVideoMuted(!call.videoMuted)}
>
Quality
network.setVideoQuality(e.target.value as VideoQuality)
}
style={{
padding: '0.3rem',
borderRadius: 6,
border: '1px solid #888',
background: '#fff',
fontSize: '0.9rem',
...(call.phase !== 'connected' ? disabledStyle : null)
}}
>
{VIDEO_QUALITIES.map(q => (
{q[0].toUpperCase() + q.slice(1)}
))}
{canShareScreen && (
call.screenStream
? void network.stopScreenShare()
: void network.startScreenShare()
}
>
)}
network.endCall()}
>
)}
Visitors ({roster.length})
{roster.length === 0 ? (
Nobody else is here right now. Open this page in another browser or
send the link to a friend.
) : (
{roster.map(p => (
{p.name} {' '}
{short(p.peerId)}
{p.busy ? 'in a call' : 'available'}
{(() => {
const disabled = !name || call !== null || p.busy
return (
network.callPeer(p.peerId)}
>
Call
)
})()}
))}
)}
{!name && roster.length > 0 && (
Enter an ID above to call someone.
)}