upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/53.md
diff options
context:
space:
mode:
Diffstat (limited to '53.md')
-rw-r--r--53.md162
1 files changed, 149 insertions, 13 deletions
diff --git a/53.md b/53.md
index 69d1c9f..a0270e5 100644
--- a/53.md
+++ b/53.md
@@ -6,13 +6,13 @@ Live Activities
6 6
7`draft` `optional` 7`draft` `optional`
8 8
9Service providers want to offer live activities to the Nostr network in such a way that participants can easily log and query by clients. This NIP describes a general framework to advertise the involvement of pubkeys in such live activities. 9This NIP introduces event kinds to advertise live spaces and the participation of pubkeys in them.
10 10
11## Concepts 11## Live Streaming
12 12
13### Live Event 13A special event with `kind:30311` "Live Streaming Event" is defined as an _addressable event_ whose tags advertise the content and participants of a live stream.
14 14
15A special event with `kind:30311` "Live Event" is defined as an _addressable event_ of public `p` tags. Each `p` tag SHOULD have a **displayable** marker name for the current role (e.g. `Host`, `Speaker`, `Participant`) of the user in the event and the relay information MAY be empty. This event will be constantly updated as participants join and leave the activity. 15Each `p` tag SHOULD have a **displayable** marker name for the current role (e.g. `Host`, `Speaker`, `Participant`) of the user in the event and the relay information MAY be empty. This event will be constantly updated as participants join and leave the activity.
16 16
17For example: 17For example:
18 18
@@ -63,13 +63,13 @@ This feature is important to avoid malicious event owners adding large account h
63 63
64### Live Chat Message 64### Live Chat Message
65 65
66Event `kind:1311` is live chat's channel message. Clients MUST include the `a` tag of the activity. An `e` tag denotes the direct parent message this post is replying to. 66Event `kind:1311` is live chat's channel message. Clients MUST include the `a` tag of the activity. An `e` tag denotes the direct parent message this post is replying to.
67 67
68```jsonc 68```jsonc
69{ 69{
70 "kind": 1311, 70 "kind": 1311,
71 "tags": [ 71 "tags": [
72 ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "root"], 72 ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
73 ], 73 ],
74 "content": "Zaps to live streams is beautiful.", 74 "content": "Zaps to live streams is beautiful.",
75 // other fields... 75 // other fields...
@@ -84,13 +84,9 @@ Event `kind:1311` is live chat's channel message. Clients MUST include the `a` t
84 84
85Hosts may choose to pin one or more live chat messages by updating the `pinned` tags in the live event kind `30311`. 85Hosts may choose to pin one or more live chat messages by updating the `pinned` tags in the live event kind `30311`.
86 86
87## Use Cases 87### Examples
88 88
89Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [zap.stream](https://zap.stream). 89#### Live Streaming
90
91## Example
92
93### Live Streaming
94 90
95```json 91```json
96{ 92{
@@ -114,7 +110,7 @@ Common use cases include meeting rooms/workshops, watch-together activities, or
114} 110}
115``` 111```
116 112
117### Live Streaming chat message 113#### Live Streaming chat message
118 114
119```json 115```json
120{ 116{
@@ -129,3 +125,143 @@ Common use cases include meeting rooms/workshops, watch-together activities, or
129 "sig": "997f62ddfc0827c121043074d50cfce7a528e978c575722748629a4137c45b75bdbc84170bedc723ef0a5a4c3daebf1fef2e93f5e2ddb98e5d685d022c30b622" 125 "sig": "997f62ddfc0827c121043074d50cfce7a528e978c575722748629a4137c45b75bdbc84170bedc723ef0a5a4c3daebf1fef2e93f5e2ddb98e5d685d022c30b622"
130} 126}
131``` 127```
128
129## Meeting Spaces
130
131Meeting spaces contain one or more video/audio rooms where users can join and participate in the streaming.
132
133### Meeting Space Event (kind:30312)
134
135A special event with `kind:30312` "Space Host" defines the configuration and properties of a virtual interactive space. Each space has a unique identifier and can host multiple events/meetings.
136
137```jsonc
138{
139 "kind": 30312,
140 "tags": [
141 ["d", "<unique identifier>"], // Required: Room identifier
142 ["room", "<name of the room>"], // Required: Display name
143 ["summary", "<description>"], // Optional: Room description
144 ["image", "<preview image url>"], // Optional: Room image
145 ["status", "<open, private, closed>"], // Required: Room accessibility
146 ["service", "<url>"], // Required: URL to access the room
147 ["endpoint", "<url>"], // Optional: API endpoint for status/info
148 ["t", "<hashtag>"], // Optional: Multiple hashtags allowed
149 ["p", "<pubkey>", "<url>", "<role>", "<proof>"], // Required: At least one provider
150 ["relays", "<url>", "<url>", /*...*/] // Optional: Preferred relays
151 ],
152 "content": "" // Usually empty, may contain additional metadata
153}
154```
155
156Space properties:
157* MUST be either open, private or closed. Closed means the room is not in operation.
158* MAY specify access control policy for private rooms (e.g. invite-only, payment required)
159* MAY persist when not in use
160* MUST have at least one provider with "Host" role
161* MAY have multiple providers with different roles
162
163Provider roles (p tags):
164* Host: Full room management capabilities
165* Moderator: Room moderation capabilities
166* Speaker: Allowed to present/speak
167* Optional proof field for role verification
168
169### Meeting Room Events (kind:30313)
170
171A special event with kind:30313 represents a scheduled or ongoing meeting within a room. It MUST reference its parent room using the d tag.
172
173```jsonc
174{
175 "kind": 30313,
176 "tags": [
177 ["d", "<event-unique-identifier>"], // Required: Event identifier
178 ["a", "30312:<pubkey>:<room-id>", "wss://nostr.example.com"], // Required: Reference to parent space, 'd' from 30312
179 ["title", "<meeting-title>"], // Required: Meeting title
180 ["summary", "<description>"], // Optional: Meeting description
181 ["image", "<preview image url>"], // Optional: Meeting image
182 ["starts", "<unix timestamp>"], // Required: Start time
183 ["ends", "<unix timestamp>"], // Optional: End time
184 ["status", "<planned, live, ended>"], // Required: Meeting status
185 ["total_participants", "<number>"], // Optional: Total registered
186 ["current_participants", "<number>"], // Optional: Currently active
187 ["p", "<pubkey>", "<url>", "<role>"], // Optional: Participant with role
188 ],
189 "content": "" // Usually empty, may contain additional metadata
190}
191```
192
193Event properties:
194* MUST reference parent room via d tag
195* MUST have a status (planned/live/ended)
196* MUST have a start time
197* MAY track participant counts
198* MAY include participant roles specific to the event
199
200Event management:
201* Clients SHOULD update event status regularly when live
202* Events without updates for 1 hour MAY be considered ended
203* starts and ends timestamps SHOULD be updated when status changes
204
205### Examples
206
207#### Meeting Space (kind:30312)
208
209```jsonc
210{
211 "kind": 30312,
212 "tags": [
213 ["d", "main-conference-room"],
214 ["room", "Main Conference Hall"],
215 ["summary", "Our primary conference space"],
216 ["image", "https://example.com/room.jpg"],
217 ["status", "open"],
218 ["service", "https://meet.example.com/room"],
219 ["endpoint", "https://api.example.com/room"],
220 ["t", "conference"],
221 ["p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca", "wss://nostr.example.com/", "Owner"],
222 ["p", "14aeb..8dad4", "wss://provider2.com/", "Moderator"],
223 ["relays", "wss://relay1.com", "wss://relay2.com"]
224 ],
225 "content": ""
226}
227```
228
229#### Meeting room (kind:30313)
230
231```jsonc
232{
233 "kind": 30313,
234 "tags": [
235 ["d", "annual-meeting-2025"],
236 ["a", "30312:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:main-conference-room", "wss://nostr.example.com"]
237 ["title", "Annual Company Meeting 2025"],
238 ["summary", "Yearly company-wide meeting"],
239 ["image", "https://example.com/meeting.jpg"],
240 ["starts", "1676262123"],
241 ["ends", "1676269323"],
242 ["status", "live"],
243 ["total_participants", "180"],
244 ["current_participants", "175"],
245 ["p", "91cf9..4e5ca", "wss://provider1.com/", "Speaker"],
246 ],
247 "content": ""
248}
249```
250### Room Presence
251
252New `kind: 10312` provides an event which signals presence of a listener.
253
254The presence event SHOULD be updated at regular intervals and clients SHOULD filter presence events older than
255a given time window.
256
257**This kind `10312` is a regular replaceable event, as such presence can only be indicated in one room at a time.**
258
259```json
260{
261 "kind": 10312,
262 "tags": [
263 ["a" , "<room-a-tag>", "<relay-hint>", "root"],
264 ["hand", "1"] // hand raised flag
265 ]
266}
267```