From 7bad8685b3f74c070258a95ef07a4bb0cf51f916 Mon Sep 17 00:00:00 2001 From: Jack Chakany Date: Mon, 13 Mar 2023 20:11:27 -0400 Subject: [PATCH] room identifiers --- 100.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/100.md b/100.md index 07426645..c26380d6 100644 --- a/100.md +++ b/100.md @@ -1,9 +1,11 @@ -# NIP-100 -## WebRTC +# NIP-100 WebRTC `draft` `optional` `author:jacany` This NIP defines how to do WebRTC communication over nostr +## Defining Rooms +Rooms are essentially the space that you will be connected to. This must be defined by a `r` tag following the pubkey of the person you are connected to or some other identifier (maybe a lobby id for a joinable voice channel, etc.) + ### Broadcasting that you are present Announces that you are here, and ready to connect to others. The connection ID is inferred from the provided pubkey. @@ -12,7 +14,8 @@ The connection ID is inferred from the provided pubkey. "kind": 25050, "pubkey": "", "tags": [ - ["type", "connect"] + ["type", "connect"], + ["r", ""] ] } ``` @@ -23,7 +26,8 @@ The connection ID is inferred from the provided pubkey. "kind": 25050, "pubkey": "", "tags": [ - ["type", "disconnect"] + ["type", "disconnect"], + ["r", ""] ] } ``` @@ -36,7 +40,8 @@ Used when responding to a `type:connect`. Offering to connect to that peer. "pubkey": "", "tags": [ ["type", "offer"], - ["p", ""] + ["p", ""], + ["r", ""] ], "content": { "offer": "", @@ -52,7 +57,8 @@ Used when responding to a `type:connect`. Offering to connect to that peer. "pubkey": "", "tags": [ ["type", "answer"], - ["p", ""] + ["p", ""], + ["r", ""] ], "content": { "sdp": "", @@ -68,7 +74,8 @@ Used when responding to a `type:connect`. Offering to connect to that peer. "pubkey": "", "tags": [ ["type", "answer"], - ["p", ""] + ["p", ""], + ["r", ""] ], "content": { "candidate": "", @@ -77,4 +84,4 @@ Used when responding to a `type:connect`. Offering to connect to that peer. } ``` -Essentially, just directly feed what comes out of the WebRTC functions straight into the `content` field. It makes things cleaner and easier. \ No newline at end of file +Essentially, just directly feed what comes out of the WebRTC functions straight into the `content` field. It makes things cleaner and easier.