diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/extra-utils/server/config.ts | 15 | ||||
-rw-r--r-- | shared/models/server/custom-config.model.ts | 29 | ||||
-rw-r--r-- | shared/models/server/server-config.model.ts | 10 | ||||
-rw-r--r-- | shared/models/videos/index.ts | 2 | ||||
-rw-r--r-- | shared/models/videos/video-create.model.ts | 2 | ||||
-rw-r--r-- | shared/models/videos/video-live.model.ts | 4 | ||||
-rw-r--r-- | shared/models/videos/video-state.enum.ts | 4 | ||||
-rw-r--r-- | shared/models/videos/video-update.model.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video.model.ts | 2 |
9 files changed, 57 insertions, 12 deletions
diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts index 3ae1c6e67..3606976bd 100644 --- a/shared/extra-utils/server/config.ts +++ b/shared/extra-utils/server/config.ts | |||
@@ -126,6 +126,21 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti | |||
126 | enabled: false | 126 | enabled: false |
127 | } | 127 | } |
128 | }, | 128 | }, |
129 | live: { | ||
130 | enabled: true, | ||
131 | transcoding: { | ||
132 | enabled: true, | ||
133 | threads: 4, | ||
134 | resolutions: { | ||
135 | '240p': true, | ||
136 | '360p': true, | ||
137 | '480p': true, | ||
138 | '720p': true, | ||
139 | '1080p': true, | ||
140 | '2160p': true | ||
141 | } | ||
142 | } | ||
143 | }, | ||
129 | import: { | 144 | import: { |
130 | videos: { | 145 | videos: { |
131 | http: { | 146 | http: { |
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts index 338a59341..e609d1a33 100644 --- a/shared/models/server/custom-config.model.ts +++ b/shared/models/server/custom-config.model.ts | |||
@@ -1,6 +1,15 @@ | |||
1 | import { NSFWPolicyType } from '../videos/nsfw-policy.type' | 1 | import { NSFWPolicyType } from '../videos/nsfw-policy.type' |
2 | import { BroadcastMessageLevel } from './broadcast-message-level.type' | 2 | import { BroadcastMessageLevel } from './broadcast-message-level.type' |
3 | 3 | ||
4 | export type ConfigResolutions = { | ||
5 | '240p': boolean | ||
6 | '360p': boolean | ||
7 | '480p': boolean | ||
8 | '720p': boolean | ||
9 | '1080p': boolean | ||
10 | '2160p': boolean | ||
11 | } | ||
12 | |||
4 | export interface CustomConfig { | 13 | export interface CustomConfig { |
5 | instance: { | 14 | instance: { |
6 | name: string | 15 | name: string |
@@ -75,15 +84,7 @@ export interface CustomConfig { | |||
75 | allowAudioFiles: boolean | 84 | allowAudioFiles: boolean |
76 | 85 | ||
77 | threads: number | 86 | threads: number |
78 | resolutions: { | 87 | resolutions: ConfigResolutions & { '0p': boolean } |
79 | '0p': boolean | ||
80 | '240p': boolean | ||
81 | '360p': boolean | ||
82 | '480p': boolean | ||
83 | '720p': boolean | ||
84 | '1080p': boolean | ||
85 | '2160p': boolean | ||
86 | } | ||
87 | 88 | ||
88 | webtorrent: { | 89 | webtorrent: { |
89 | enabled: boolean | 90 | enabled: boolean |
@@ -94,6 +95,16 @@ export interface CustomConfig { | |||
94 | } | 95 | } |
95 | } | 96 | } |
96 | 97 | ||
98 | live: { | ||
99 | enabled: boolean | ||
100 | |||
101 | transcoding: { | ||
102 | enabled: boolean | ||
103 | threads: number | ||
104 | resolutions: ConfigResolutions | ||
105 | } | ||
106 | } | ||
107 | |||
97 | import: { | 108 | import: { |
98 | videos: { | 109 | videos: { |
99 | http: { | 110 | http: { |
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index a8e5dfbff..77694a627 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts | |||
@@ -98,6 +98,16 @@ export interface ServerConfig { | |||
98 | enabledResolutions: number[] | 98 | enabledResolutions: number[] |
99 | } | 99 | } |
100 | 100 | ||
101 | live: { | ||
102 | enabled: boolean | ||
103 | |||
104 | transcoding: { | ||
105 | enabled: boolean | ||
106 | |||
107 | enabledResolutions: number[] | ||
108 | } | ||
109 | } | ||
110 | |||
101 | import: { | 111 | import: { |
102 | videos: { | 112 | videos: { |
103 | http: { | 113 | http: { |
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index 20b9638ab..2a032a456 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -19,6 +19,8 @@ export * from './video-create.model' | |||
19 | export * from './video-file-metadata' | 19 | export * from './video-file-metadata' |
20 | export * from './video-file.model' | 20 | export * from './video-file.model' |
21 | 21 | ||
22 | export * from './video-live.model' | ||
23 | |||
22 | export * from './video-privacy.enum' | 24 | export * from './video-privacy.enum' |
23 | export * from './video-query.type' | 25 | export * from './video-query.type' |
24 | export * from './video-rate.type' | 26 | export * from './video-rate.type' |
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts index 53631bf79..59b118567 100644 --- a/shared/models/videos/video-create.model.ts +++ b/shared/models/videos/video-create.model.ts | |||
@@ -16,5 +16,5 @@ export interface VideoCreate { | |||
16 | downloadEnabled?: boolean | 16 | downloadEnabled?: boolean |
17 | privacy: VideoPrivacy | 17 | privacy: VideoPrivacy |
18 | scheduleUpdate?: VideoScheduleUpdate | 18 | scheduleUpdate?: VideoScheduleUpdate |
19 | originallyPublishedAt: Date | string | 19 | originallyPublishedAt?: Date | string |
20 | } | 20 | } |
diff --git a/shared/models/videos/video-live.model.ts b/shared/models/videos/video-live.model.ts new file mode 100644 index 000000000..2a834dc91 --- /dev/null +++ b/shared/models/videos/video-live.model.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export interface VideoLive { | ||
2 | rtmpUrl: string | ||
3 | streamKey: string | ||
4 | } | ||
diff --git a/shared/models/videos/video-state.enum.ts b/shared/models/videos/video-state.enum.ts index 31c501932..49d997f24 100644 --- a/shared/models/videos/video-state.enum.ts +++ b/shared/models/videos/video-state.enum.ts | |||
@@ -1,5 +1,7 @@ | |||
1 | export const enum VideoState { | 1 | export const enum VideoState { |
2 | PUBLISHED = 1, | 2 | PUBLISHED = 1, |
3 | TO_TRANSCODE = 2, | 3 | TO_TRANSCODE = 2, |
4 | TO_IMPORT = 3 | 4 | TO_IMPORT = 3, |
5 | WAITING_FOR_LIVE = 4, | ||
6 | LIVE_ENDED = 5 | ||
5 | } | 7 | } |
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts index 86653b959..e21ccae04 100644 --- a/shared/models/videos/video-update.model.ts +++ b/shared/models/videos/video-update.model.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import { VideoPrivacy } from './video-privacy.enum' | 1 | import { VideoPrivacy } from './video-privacy.enum' |
2 | import { VideoScheduleUpdate } from './video-schedule-update.model' | 2 | import { VideoScheduleUpdate } from './video-schedule-update.model' |
3 | |||
4 | export interface VideoUpdate { | 3 | export interface VideoUpdate { |
5 | name?: string | 4 | name?: string |
6 | category?: number | 5 | category?: number |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 158ee8f05..caefeff82 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -23,6 +23,8 @@ export interface Video { | |||
23 | isLocal: boolean | 23 | isLocal: boolean |
24 | name: string | 24 | name: string |
25 | 25 | ||
26 | isLive: boolean | ||
27 | |||
26 | thumbnailPath: string | 28 | thumbnailPath: string |
27 | thumbnailUrl?: string | 29 | thumbnailUrl?: string |
28 | 30 | ||