diff options
| -rw-r--r-- | 29.md | 23 |
1 files changed, 21 insertions, 2 deletions
| @@ -58,8 +58,6 @@ The `Authorization` event should be of kind `27235` and contain a tag `["u", "ht | |||
| 58 | 58 | ||
| 59 | Relays should enforce access control at the LiveKit JWT creation time according to the group settings. | 59 | Relays should enforce access control at the LiveKit JWT creation time according to the group settings. |
| 60 | 60 | ||
| 61 | Relays MUST set the `sub` property on the issued JWT (called "identity" in the standard LiveKit libraries) to the requesting user's lowercase hexadecimal public key. | ||
| 62 | |||
| 63 | In order to inform clients about relay support for AV (so they can display that option for users when creating or editing groups) relays should serve a status code `204` at `https://relay.tld/.well-known/nip29/livekit`. | 61 | In order to inform clients about relay support for AV (so they can display that option for users when creating or editing groups) relays should serve a status code `204` at `https://relay.tld/.well-known/nip29/livekit`. |
| 64 | 62 | ||
| 65 | ## Event definitions | 63 | ## Event definitions |
| @@ -234,6 +232,27 @@ The process through which the relay decides what roles to support and how to han | |||
| 234 | } | 232 | } |
| 235 | ``` | 233 | ``` |
| 236 | 234 | ||
| 235 | - *livekit participants* (`kind:39004`) (optional) | ||
| 236 | |||
| 237 | This is an event that MAY be published by the relay informing users and clients about who is live in an AV room. | ||
| 238 | |||
| 239 | This should be updated whenever a new user leaves or joins a group, clients are expected to be actively subscribed to it. | ||
| 240 | |||
| 241 | The event MUST contain zero or more `participant` tags with the participant's public key as lowercase hex and their identity in the LiveKit context (the identity is defined by the relay at JWT creation time and recorded in the JWT `sub` field). | ||
| 242 | |||
| 243 | ```jsonc | ||
| 244 | { | ||
| 245 | "kind": 39004, | ||
| 246 | "content": "", | ||
| 247 | "tags": [ | ||
| 248 | ["d", "<group-id>"], | ||
| 249 | ["participant", "<pubkey>", "<jwt-identity>"], | ||
| 250 | // other participants... | ||
| 251 | ], | ||
| 252 | // other fields... | ||
| 253 | } | ||
| 254 | ``` | ||
| 255 | |||
| 237 | ## Implementation quirks | 256 | ## Implementation quirks |
| 238 | 257 | ||
| 239 | ### Checking your own membership in a group | 258 | ### Checking your own membership in a group |