aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-15 15:06:03 +0100
committerChocobozzz <me@florianbigard.com>2019-11-25 10:59:43 +0100
commitd7a25329f9e607894d29ab342b9cb66638b56dc0 (patch)
tree6cd6bc4f2689f78944238b313c93427423a932ac /shared/models/activitypub
parent14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff)
downloadPeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz
PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst
PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip
Add ability to disable webtorrent
In favour of HLS
Diffstat (limited to 'shared/models/activitypub')
-rw-r--r--shared/models/activitypub/objects/common-objects.ts51
1 files changed, 33 insertions, 18 deletions
diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts
index 8c89810d6..2a6529fed 100644
--- a/shared/models/activitypub/objects/common-objects.ts
+++ b/shared/models/activitypub/objects/common-objects.ts
@@ -3,12 +3,6 @@ export interface ActivityIdentifierObject {
3 name: string 3 name: string
4} 4}
5 5
6export interface ActivityTagObject {
7 type: 'Hashtag' | 'Mention'
8 href?: string
9 name: string
10}
11
12export interface ActivityIconObject { 6export interface ActivityIconObject {
13 type: 'Image' 7 type: 'Image'
14 url: string 8 url: string
@@ -19,8 +13,6 @@ export interface ActivityIconObject {
19 13
20export type ActivityVideoUrlObject = { 14export type ActivityVideoUrlObject = {
21 type: 'Link' 15 type: 'Link'
22 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
23 mimeType?: 'video/mp4' | 'video/webm' | 'video/ogg'
24 mediaType: 'video/mp4' | 'video/webm' | 'video/ogg' 16 mediaType: 'video/mp4' | 'video/webm' | 'video/ogg'
25 href: string 17 href: string
26 height: number 18 height: number
@@ -31,8 +23,6 @@ export type ActivityVideoUrlObject = {
31export type ActivityPlaylistSegmentHashesObject = { 23export type ActivityPlaylistSegmentHashesObject = {
32 type: 'Link' 24 type: 'Link'
33 name: 'sha256' 25 name: 'sha256'
34 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
35 mimeType?: 'application/json'
36 mediaType: 'application/json' 26 mediaType: 'application/json'
37 href: string 27 href: string
38} 28}
@@ -44,31 +34,56 @@ export type ActivityPlaylistInfohashesObject = {
44 34
45export type ActivityPlaylistUrlObject = { 35export type ActivityPlaylistUrlObject = {
46 type: 'Link' 36 type: 'Link'
47 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
48 mimeType?: 'application/x-mpegURL'
49 mediaType: 'application/x-mpegURL' 37 mediaType: 'application/x-mpegURL'
50 href: string 38 href: string
51 tag?: (ActivityPlaylistSegmentHashesObject | ActivityPlaylistInfohashesObject)[] 39 tag?: ActivityTagObject[]
52} 40}
53 41
54export type ActivityBitTorrentUrlObject = { 42export type ActivityBitTorrentUrlObject = {
55 type: 'Link' 43 type: 'Link'
56 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
57 mimeType?: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
58 mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet' 44 mediaType: 'application/x-bittorrent' | 'application/x-bittorrent;x-scheme-handler/magnet'
59 href: string 45 href: string
60 height: number 46 height: number
61} 47}
62 48
49export type ActivityMagnetUrlObject = {
50 type: 'Link'
51 mediaType: 'application/x-bittorrent;x-scheme-handler/magnet'
52 href: string
53 height: number
54}
55
63export type ActivityHtmlUrlObject = { 56export type ActivityHtmlUrlObject = {
64 type: 'Link' 57 type: 'Link'
65 // TODO: remove mimeType (backward compatibility, introduced in v1.1.0)
66 mimeType?: 'text/html'
67 mediaType: 'text/html' 58 mediaType: 'text/html'
68 href: string 59 href: string
69} 60}
70 61
71export type ActivityUrlObject = ActivityVideoUrlObject | ActivityPlaylistUrlObject | ActivityBitTorrentUrlObject | ActivityHtmlUrlObject 62export interface ActivityHashTagObject {
63 type: 'Hashtag' | 'Mention'
64 href?: string
65 name: string
66}
67
68export interface ActivityMentionObject {
69 type: 'Hashtag' | 'Mention'
70 href?: string
71 name: string
72}
73
74export type ActivityTagObject = ActivityPlaylistSegmentHashesObject |
75 ActivityPlaylistInfohashesObject |
76 ActivityVideoUrlObject |
77 ActivityHashTagObject |
78 ActivityMentionObject |
79 ActivityBitTorrentUrlObject |
80 ActivityMagnetUrlObject
81
82export type ActivityUrlObject = ActivityVideoUrlObject |
83 ActivityPlaylistUrlObject |
84 ActivityBitTorrentUrlObject |
85 ActivityMagnetUrlObject |
86 ActivityHtmlUrlObject
72 87
73export interface ActivityPubAttributedTo { 88export interface ActivityPubAttributedTo {
74 type: 'Group' | 'Person' 89 type: 'Group' | 'Person'