LiveKit audio & video rooms
Audio and video rooms for NIP-29 groups via a LiveKit server: token endpoints, JWT signing and the group metadata that advertises rooms.
Setup
- Set
relay.livekit_url,relay.livekit_api_keyandrelay.livekit_api_secretin the config file. - Add the
livekittag to a group's metadata via an admin'skind:9002edit. - Clients fetch a JWT from
/.well-known/nip29/livekit/<group-id>with NIP-98 auth (a pubkey banned with NIP-86banpubkeyis refused). - The relay publishes a
kind:39004participant list per livekit group, refreshed everyrelay.livekit_participants_interval_secs(default 15) and immediately when LiveKit sends webhooks to/.well-known/nip29/livekit/webhook— point the LiveKit server'swebhook.urlsat it and letwebhook.api_keymatchrelay.livekit_api_key(the relay verifies the signed payload; missed events are reconciled by the poll). Leaving the group's LiveKit mode clears the list.
Checking support
sh
curl -i http://127.0.0.1:8080/.well-known/nip29/livekit204 means the room server is enabled.
Configuration
toml
[relay]
livekit_url = "wss://livekit.example.com"
livekit_api_key = "..."
livekit_api_secret = "..."
livekit_participants_interval_secs = 15