From c6c0fa6cd8fe8f752463d8982c3dbcd448739c4e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 17 Sep 2020 09:20:52 +0200 Subject: Live streaming implementation first step --- shared/models/videos/index.ts | 2 ++ shared/models/videos/video-create.model.ts | 2 +- shared/models/videos/video-live.model.ts | 4 ++++ shared/models/videos/video-state.enum.ts | 4 +++- shared/models/videos/video-update.model.ts | 1 - shared/models/videos/video.model.ts | 2 ++ 6 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 shared/models/videos/video-live.model.ts (limited to 'shared/models/videos') 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' export * from './video-file-metadata' export * from './video-file.model' +export * from './video-live.model' + export * from './video-privacy.enum' export * from './video-query.type' 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 { downloadEnabled?: boolean privacy: VideoPrivacy scheduleUpdate?: VideoScheduleUpdate - originallyPublishedAt: Date | string + originallyPublishedAt?: Date | string } 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 @@ +export interface VideoLive { + rtmpUrl: string + streamKey: string +} 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 @@ export const enum VideoState { PUBLISHED = 1, TO_TRANSCODE = 2, - TO_IMPORT = 3 + TO_IMPORT = 3, + WAITING_FOR_LIVE = 4, + LIVE_ENDED = 5 } 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 @@ import { VideoPrivacy } from './video-privacy.enum' import { VideoScheduleUpdate } from './video-schedule-update.model' - export interface VideoUpdate { name?: string 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 { isLocal: boolean name: string + isLive: boolean + thumbnailPath: string thumbnailUrl?: string -- cgit v1.2.3