upleb.uk

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

summaryrefslogtreecommitdiff
path: root/44.md
blob: 0411ec4e5f9df19832706eec5e9993a375fa464c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
NIP-44
======

Video Events
---------------

`draft` `optional`

This specification defines video events representing a dedicated post of externally hosted content. These video events are _parameterized replaceable_ and deletable per [NIP-09](09.md).

Unlike a `kind 1` event with a video attached, Video Events are meant to contain all necessary metadata concerning the media and to be surfaced in media specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a YouTube like nostr client where the video itself is at the center of the experience.

## Video Events

#### Format

The format uses a parameterized replaceable event kind `34235`.

The `.content` of these events is optional and should be a summary of the video's contents.

The list of tags are as follows:
* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event.
* `title` (required) title of the video
* `src` (required) a link to the video data
* `m` (optional) the MIME type of the video data in the `src` tag
* `summary` (optional) summary/description of the video (same as content)
* `image` (optional) thumbnail or preview image for the video
* `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
* `t` (optional, repeated) hashtag to categorize video
* `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.

```json
{
  "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>,
  "created_at": <Unix timestamp in seconds>,
  "kind": 34235,
  "content": "<summary of video>",
  "tags": [
    ["d", "<UUID>"],

    ["title", "<title of video>"],
    ["summary", "<summary of video>"],
    ["image", "<thumbnail image for video>"],

    // Video Data
    ["src", "<url>"],
    ["m", "<MIME type>"],
    ["text-track", "<url>", "<text track type>", "<optional language>"],
    ["content-warning", "<reason>"],

    // Participants
    ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
    ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],

    // Hashtags
    ["t", "<tag>"],
    ["t", "<tag>"],

    // Reference links
    ["r", "<url>"],
    ["r", "<url>"]
  ]
}
```

## Video View

A video event view is a response to a video event to track a user's view or progress viewing the video.

### Format

The format uses a parameterized replaceable event kind `34236`.

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:
* `a` (required) reference tag to kind `34235` video event being viewed
* `d` (required) universally unique identifier. Generated by the client creating the video event view
* `progress` (optional) timestamp of the user's progress in format `HH:MM:SS.sss`


```json
{
  "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>,
  "created_at": <Unix timestamp in seconds>,
  "kind": 34236,
  "content": "<note>",
  "tags": [
    ["a", "<34235>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"],
    ["d", "<UUID>"],
    ["progress", "00:08:31.520"],
  ]
}
```