room identifiers

This commit is contained in:
Jack Chakany 2023-03-13 20:11:27 -04:00 committed by GitHub
parent aadc197e88
commit 7bad8685b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
100.md
View File

@ -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": "<sender pubkey>",
"tags": [
["type", "connect"]
["type", "connect"],
["r", "<room id>"]
]
}
```
@ -23,7 +26,8 @@ The connection ID is inferred from the provided pubkey.
"kind": 25050,
"pubkey": "<sender pubkey>",
"tags": [
["type", "disconnect"]
["type", "disconnect"],
["r", "<room id>"]
]
}
```
@ -36,7 +40,8 @@ Used when responding to a `type:connect`. Offering to connect to that peer.
"pubkey": "<sender pubkey>",
"tags": [
["type", "offer"],
["p", "<reciever pubkey>"]
["p", "<reciever pubkey>"],
["r", "<room id>"]
],
"content": {
"offer": "<offer>",
@ -52,7 +57,8 @@ Used when responding to a `type:connect`. Offering to connect to that peer.
"pubkey": "<sender pubkey>",
"tags": [
["type", "answer"],
["p", "<reciever pubkey>"]
["p", "<reciever pubkey>"],
["r", "<room id>"]
],
"content": {
"sdp": "<sdp>",
@ -68,7 +74,8 @@ Used when responding to a `type:connect`. Offering to connect to that peer.
"pubkey": "<sender pubkey>",
"tags": [
["type", "answer"],
["p", "<reciever pubkey>"]
["p", "<reciever pubkey>"],
["r", "<room id>"]
],
"content": {
"candidate": "<sdp>",