aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-09-17 09:20:52 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commitc6c0fa6cd8fe8f752463d8982c3dbcd448739c4e (patch)
tree79304b0152b0a38d33b26e65d4acdad0da4032a7 /shared/models/videos
parent110d463fece85e87a26aca48a6048ae0017a27b3 (diff)
downloadPeerTube-c6c0fa6cd8fe8f752463d8982c3dbcd448739c4e.tar.gz
PeerTube-c6c0fa6cd8fe8f752463d8982c3dbcd448739c4e.tar.zst
PeerTube-c6c0fa6cd8fe8f752463d8982c3dbcd448739c4e.zip
Live streaming implementation first step
Diffstat (limited to 'shared/models/videos')
-rw-r--r--shared/models/videos/index.ts2
-rw-r--r--shared/models/videos/video-create.model.ts2
-rw-r--r--shared/models/videos/video-live.model.ts4
-rw-r--r--shared/models/videos/video-state.enum.ts4
-rw-r--r--shared/models/videos/video-update.model.ts1
-rw-r--r--shared/models/videos/video.model.ts2
6 files changed, 12 insertions, 3 deletions
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'
19export * from './video-file-metadata' 19export * from './video-file-metadata'
20export * from './video-file.model' 20export * from './video-file.model'
21 21
22export * from './video-live.model'
23
22export * from './video-privacy.enum' 24export * from './video-privacy.enum'
23export * from './video-query.type' 25export * from './video-query.type'
24export * from './video-rate.type' 26export * 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 @@
1export 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 @@
1export const enum VideoState { 1export 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 @@
1import { VideoPrivacy } from './video-privacy.enum' 1import { VideoPrivacy } from './video-privacy.enum'
2import { VideoScheduleUpdate } from './video-schedule-update.model' 2import { VideoScheduleUpdate } from './video-schedule-update.model'
3
4export interface VideoUpdate { 3export 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