upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmeyer44 <54515037+zmeyer44@users.noreply.github.com>2023-12-08 09:06:14 -0500
committerGitHub <noreply@github.com>2023-12-08 09:06:14 -0500
commita2914eed6d34d2e40ad2e361519bcd52300ef25e (patch)
tree1658f57bcc123558a80dfc63adc1a0a932c4d06b
parent01035dadf450085259b4b8a8728cba7a6b4e0cef (diff)
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.
-rw-r--r--44.md36
1 files changed, 22 insertions, 14 deletions
diff --git a/44.md b/44.md
index 0411ec4..1c857c8 100644
--- a/44.md
+++ b/44.md
@@ -12,21 +12,26 @@ Unlike a `kind 1` event with a video attached, Video Events are meant to contain
12 12
13## Video Events 13## Video Events
14 14
15There 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).
16
15#### Format 17#### Format
16 18
17The format uses a parameterized replaceable event kind `34235`. 19The format uses a parameterized replaceable event kind `34235` for horizontal videos and `34236` for vertical videos.
18 20
19The `.content` of these events is optional and should be a summary of the video's contents. 21The `.content` of these events is optional and should be a summary of the video's contents.
20 22
21The list of tags are as follows: 23The list of tags are as follows:
22* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event. 24* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event.
23* `title` (required) title of the video 25* `title` (required) title of the video
24* `src` (required) a link to the video data 26* `url` (required) a link to the video data
25* `m` (optional) the MIME type of the video data in the `src` tag 27* `m` (optional) the MIME type of the video data in the `src` tag
26* `summary` (optional) summary/description of the video (same as content) 28* `summary` (optional) summary/description of the video (same as content)
27* `image` (optional) thumbnail or preview image for the video 29* `image` (optional) url of preview image with same dimensions
30* `thumb` (optional) url of thumbnail with same aspect ratio
31* `dim` (optional) size of file in pixels in the form <width>x<height>
28* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code 32* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
29* `content-warning` (optional) warning about content of NSFW video 33* `content-warning` (optional) warning about content of NSFW video
34* `alt` (optional) description for accessibility
30* `t` (optional, repeated) hashtag to categorize video 35* `t` (optional, repeated) hashtag to categorize video
31* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL 36* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
32* `r` (optional, repeated) references / links to web pages. 37* `r` (optional, repeated) references / links to web pages.
@@ -36,20 +41,23 @@ The list of tags are as follows:
36 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, 41 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
37 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, 42 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
38 "created_at": <Unix timestamp in seconds>, 43 "created_at": <Unix timestamp in seconds>,
39 "kind": 34235, 44 "kind": 34235 | 34236,
40 "content": "<summary of video>", 45 "content": "<summary of video>",
41 "tags": [ 46 "tags": [
42 ["d", "<UUID>"], 47 ["d", "<UUID>"],
43 48
44 ["title", "<title of video>"], 49 ["title", "<title of video>"],
45 ["summary", "<summary of video>"], 50 ["summary", "<summary of video>"],
46 ["image", "<thumbnail image for video>"], 51 ["thumb", "<thumbnail image for video>"],
52 ["image", "<preview image for video>"],
53 ["alt", <description>],
47 54
48 // Video Data 55 // Video Data
49 ["src", "<url>"], 56 ["url", "<url>"],
50 ["m", "<MIME type>"], 57 ["m", "<MIME type>"],
51 ["text-track", "<url>", "<text track type>", "<optional language>"], 58 ["text-track", "<url>", "<text track type>", "<optional language>"],
52 ["content-warning", "<reason>"], 59 ["content-warning", "<reason>"],
60 ["dim", <size of video in pixels>],
53 61
54 // Participants 62 // Participants
55 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], 63 ["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
72 80
73### Format 81### Format
74 82
75The format uses a parameterized replaceable event kind `34236`. 83The format uses a parameterized replaceable event kind `34237`.
76 84
77The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user. 85The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user.
78 86
79The list of tags are as follows: 87The list of tags are as follows:
80* `a` (required) reference tag to kind `34235` video event being viewed 88* `a` (required) reference tag to kind `34235` or `34236` video event being viewed
81* `d` (required) universally unique identifier. Generated by the client creating the video event view 89* `d` (required) same as `a` reference tag value
82* `progress` (optional) timestamp of the user's progress in format `HH:MM:SS.sss` 90* `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`
83 91
84 92
85```json 93```json
@@ -87,12 +95,12 @@ The list of tags are as follows:
87 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, 95 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
88 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, 96 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
89 "created_at": <Unix timestamp in seconds>, 97 "created_at": <Unix timestamp in seconds>,
90 "kind": 34236, 98 "kind": 34237,
91 "content": "<note>", 99 "content": "<note>",
92 "tags": [ 100 "tags": [
93 ["a", "<34235>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"], 101 ["a", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"],
94 ["d", "<UUID>"], 102 ["d", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>"],
95 ["progress", "00:08:31.520"], 103 ["viewed", <start>, <end>],
96 ] 104 ]
97} 105}
98``` 106```