extra stream kinds

This commit is contained in:
Kieran 2025-05-19 13:47:51 +01:00
parent 1c61ac29aa
commit c1c6ccecf7
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941
1 changed files with 73 additions and 0 deletions

73
53.md
View File

@ -84,6 +84,79 @@ Event `kind:1311` is live chat's channel message. Clients MUST include the `a` t
Hosts may choose to pin one or more live chat messages by updating the `pinned` tags in the live event kind `30311`.
### Stream Raids
Event `kind:1312` is a live stream raid (redirect viewers to another stream).
Clients MUST include two `a` tags, one marked as `from` and the other marked as `to` which redirects viewers to a new live stream.
The `content` MAY contain a raid message.
Clients SHOULD automatically redirect viewers from one stream to another.
This is a similar function used on Twitch also called raids.
```jsonc
{
"kind": 1312,
"tags": [
["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "from"],
["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "to"],
],
"content": "Zap this epic streamer!",
// other fields...
}
```
### Stream Clips
Event `kind:1313` is a live stream clip.
A clip is a small video clip taken from the live stream used to highlight a specific memorable or entertaining part of the stream.
Clients MUST include one `a` tag which points to the live stream event which the clip was taken from.
Clients MUST include one `r` tag which is a URL pointing to the video clip file, preferably in MP4 format for maximum compatibility.
Clients MAY also include a message about the clip in the `title` tag.
```jsonc
{
"kind": 1313,
"tags": [
["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "root"],
["r", "https://example.com/my-clip.mp4"],
["title", "Streamer gets rekt by bot!"]
],
"content": "",
// other fields...
}
```
### Stream Timeout
Event `kind:1314` is a live chat moderation event that temporarily mutes a user from chatting.
Clients MUST include one or more `p` tags of the timed out users.
Clients MUST include a [NIP-40](./40.md) expiration timestamp which signals when the timeout will end.
Clients SHOULD enfore timeouts by disabling chat functions in their apps and not displaying any chat messages from the user during their timeout.
Clients SHOULD listen for timeout events published by the stream host.
Clients MAY include a reason for the timeout in the `content` field.
```jsonc
{
"kind": 1314,
"tags": [
["p", "<pubkey-of-muted-user>"],
["expiration", "1747658333"]
],
"content": "Rude",
// other fields...
}
```
## Use Cases
Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [zap.stream](https://zap.stream).