diff options
| author | Kieran <kieran@harkin.me> | 2025-05-19 13:47:51 +0100 |
|---|---|---|
| committer | Kieran <kieran@harkin.me> | 2025-05-19 13:47:51 +0100 |
| commit | c1c6ccecf770f1329e3c40448b2c251f288b686e (patch) | |
| tree | d86707c4aebdfdb9720df64ab4b6566673457b31 | |
| parent | 1c61ac29aafcb71ffd40e1ea32f664990231eb6e (diff) | |
extra stream kinds
| -rw-r--r-- | 53.md | 73 |
1 files changed, 73 insertions, 0 deletions
| @@ -84,6 +84,79 @@ Event `kind:1311` is live chat's channel message. Clients MUST include the `a` t | |||
| 84 | 84 | ||
| 85 | Hosts may choose to pin one or more live chat messages by updating the `pinned` tags in the live event kind `30311`. | 85 | Hosts may choose to pin one or more live chat messages by updating the `pinned` tags in the live event kind `30311`. |
| 86 | 86 | ||
| 87 | ### Stream Raids | ||
| 88 | |||
| 89 | Event `kind:1312` is a live stream raid (redirect viewers to another stream). | ||
| 90 | |||
| 91 | Clients MUST include two `a` tags, one marked as `from` and the other marked as `to` which redirects viewers to a new live stream. | ||
| 92 | The `content` MAY contain a raid message. | ||
| 93 | |||
| 94 | Clients SHOULD automatically redirect viewers from one stream to another. | ||
| 95 | This is a similar function used on Twitch also called raids. | ||
| 96 | |||
| 97 | ```jsonc | ||
| 98 | { | ||
| 99 | "kind": 1312, | ||
| 100 | "tags": [ | ||
| 101 | ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "from"], | ||
| 102 | ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "to"], | ||
| 103 | ], | ||
| 104 | "content": "Zap this epic streamer!", | ||
| 105 | // other fields... | ||
| 106 | } | ||
| 107 | ``` | ||
| 108 | |||
| 109 | ### Stream Clips | ||
| 110 | |||
| 111 | Event `kind:1313` is a live stream clip. | ||
| 112 | |||
| 113 | A clip is a small video clip taken from the live stream used to highlight a specific memorable or entertaining part of the stream. | ||
| 114 | |||
| 115 | Clients MUST include one `a` tag which points to the live stream event which the clip was taken from. | ||
| 116 | |||
| 117 | Clients MUST include one `r` tag which is a URL pointing to the video clip file, preferably in MP4 format for maximum compatibility. | ||
| 118 | |||
| 119 | Clients MAY also include a message about the clip in the `title` tag. | ||
| 120 | |||
| 121 | ```jsonc | ||
| 122 | { | ||
| 123 | "kind": 1313, | ||
| 124 | "tags": [ | ||
| 125 | ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "root"], | ||
| 126 | ["r", "https://example.com/my-clip.mp4"], | ||
| 127 | ["title", "Streamer gets rekt by bot!"] | ||
| 128 | ], | ||
| 129 | "content": "", | ||
| 130 | // other fields... | ||
| 131 | } | ||
| 132 | ``` | ||
| 133 | |||
| 134 | ### Stream Timeout | ||
| 135 | |||
| 136 | Event `kind:1314` is a live chat moderation event that temporarily mutes a user from chatting. | ||
| 137 | |||
| 138 | Clients MUST include one or more `p` tags of the timed out users. | ||
| 139 | |||
| 140 | Clients MUST include a [NIP-40](./40.md) expiration timestamp which signals when the timeout will end. | ||
| 141 | |||
| 142 | Clients SHOULD enfore timeouts by disabling chat functions in their apps and not displaying any chat messages from the user during their timeout. | ||
| 143 | |||
| 144 | Clients SHOULD listen for timeout events published by the stream host. | ||
| 145 | |||
| 146 | Clients MAY include a reason for the timeout in the `content` field. | ||
| 147 | |||
| 148 | ```jsonc | ||
| 149 | { | ||
| 150 | "kind": 1314, | ||
| 151 | "tags": [ | ||
| 152 | ["p", "<pubkey-of-muted-user>"], | ||
| 153 | ["expiration", "1747658333"] | ||
| 154 | ], | ||
| 155 | "content": "Rude", | ||
| 156 | // other fields... | ||
| 157 | } | ||
| 158 | ``` | ||
| 159 | |||
| 87 | ## Use Cases | 160 | ## Use Cases |
| 88 | 161 | ||
| 89 | Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [zap.stream](https://zap.stream). | 162 | Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [zap.stream](https://zap.stream). |