mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
Update 44.md
Adding some of Vitor's suggestions, differentiating between horizontal and vertical video kinds, changing how views are kept track of, and changing some tag names.
This commit is contained in:
parent
01035dadf4
commit
a2914eed6d
36
44.md
36
44.md
|
@ -12,21 +12,26 @@ Unlike a `kind 1` event with a video attached, Video Events are meant to contain
|
||||||
|
|
||||||
## Video Events
|
## Video Events
|
||||||
|
|
||||||
|
There are two types of video events represented by different kinds: horizontal and vertical video events. This is meant to allow clients to cater to each as the viewing experience for horizontal (landscape) videos is often different than that of vertical (portrait) videos (Stories, Reels, Shorts, etc).
|
||||||
|
|
||||||
#### Format
|
#### Format
|
||||||
|
|
||||||
The format uses a parameterized replaceable event kind `34235`.
|
The format uses a parameterized replaceable event kind `34235` for horizontal videos and `34236` for vertical videos.
|
||||||
|
|
||||||
The `.content` of these events is optional and should be a summary of the video's contents.
|
The `.content` of these events is optional and should be a summary of the video's contents.
|
||||||
|
|
||||||
The list of tags are as follows:
|
The list of tags are as follows:
|
||||||
* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event.
|
* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event.
|
||||||
* `title` (required) title of the video
|
* `title` (required) title of the video
|
||||||
* `src` (required) a link to the video data
|
* `url` (required) a link to the video data
|
||||||
* `m` (optional) the MIME type of the video data in the `src` tag
|
* `m` (optional) the MIME type of the video data in the `src` tag
|
||||||
* `summary` (optional) summary/description of the video (same as content)
|
* `summary` (optional) summary/description of the video (same as content)
|
||||||
* `image` (optional) thumbnail or preview image for the video
|
* `image` (optional) url of preview image with same dimensions
|
||||||
|
* `thumb` (optional) url of thumbnail with same aspect ratio
|
||||||
|
* `dim` (optional) size of file in pixels in the form <width>x<height>
|
||||||
* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
|
* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
|
||||||
* `content-warning` (optional) warning about content of NSFW video
|
* `content-warning` (optional) warning about content of NSFW video
|
||||||
|
* `alt` (optional) description for accessibility
|
||||||
* `t` (optional, repeated) hashtag to categorize video
|
* `t` (optional, repeated) hashtag to categorize video
|
||||||
* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
|
* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
|
||||||
* `r` (optional, repeated) references / links to web pages.
|
* `r` (optional, repeated) references / links to web pages.
|
||||||
|
@ -36,20 +41,23 @@ The list of tags are as follows:
|
||||||
"id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
|
"id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
|
||||||
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
|
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
|
||||||
"created_at": <Unix timestamp in seconds>,
|
"created_at": <Unix timestamp in seconds>,
|
||||||
"kind": 34235,
|
"kind": 34235 | 34236,
|
||||||
"content": "<summary of video>",
|
"content": "<summary of video>",
|
||||||
"tags": [
|
"tags": [
|
||||||
["d", "<UUID>"],
|
["d", "<UUID>"],
|
||||||
|
|
||||||
["title", "<title of video>"],
|
["title", "<title of video>"],
|
||||||
["summary", "<summary of video>"],
|
["summary", "<summary of video>"],
|
||||||
["image", "<thumbnail image for video>"],
|
["thumb", "<thumbnail image for video>"],
|
||||||
|
["image", "<preview image for video>"],
|
||||||
|
["alt", <description>],
|
||||||
|
|
||||||
// Video Data
|
// Video Data
|
||||||
["src", "<url>"],
|
["url", "<url>"],
|
||||||
["m", "<MIME type>"],
|
["m", "<MIME type>"],
|
||||||
["text-track", "<url>", "<text track type>", "<optional language>"],
|
["text-track", "<url>", "<text track type>", "<optional language>"],
|
||||||
["content-warning", "<reason>"],
|
["content-warning", "<reason>"],
|
||||||
|
["dim", <size of video in pixels>],
|
||||||
|
|
||||||
// Participants
|
// Participants
|
||||||
["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
|
["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
|
||||||
|
@ -72,14 +80,14 @@ A video event view is a response to a video event to track a user's view or prog
|
||||||
|
|
||||||
### Format
|
### Format
|
||||||
|
|
||||||
The format uses a parameterized replaceable event kind `34236`.
|
The format uses a parameterized replaceable event kind `34237`.
|
||||||
|
|
||||||
The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user.
|
The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user.
|
||||||
|
|
||||||
The list of tags are as follows:
|
The list of tags are as follows:
|
||||||
* `a` (required) reference tag to kind `34235` video event being viewed
|
* `a` (required) reference tag to kind `34235` or `34236` video event being viewed
|
||||||
* `d` (required) universally unique identifier. Generated by the client creating the video event view
|
* `d` (required) same as `a` reference tag value
|
||||||
* `progress` (optional) timestamp of the user's progress in format `HH:MM:SS.sss`
|
* `viewed` (optional, repeated) timestamp of the user's start time in `HH:MM:SS.sss`, timestamp of the user's end time in `HH:MM:SS.sss`
|
||||||
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
@ -87,12 +95,12 @@ The list of tags are as follows:
|
||||||
"id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
|
"id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
|
||||||
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
|
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
|
||||||
"created_at": <Unix timestamp in seconds>,
|
"created_at": <Unix timestamp in seconds>,
|
||||||
"kind": 34236,
|
"kind": 34237,
|
||||||
"content": "<note>",
|
"content": "<note>",
|
||||||
"tags": [
|
"tags": [
|
||||||
["a", "<34235>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"],
|
["a", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"],
|
||||||
["d", "<UUID>"],
|
["d", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>"],
|
||||||
["progress", "00:08:31.520"],
|
["viewed", <start>, <end>],
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user