From 05a60d85997c108d39bcfb14f1ffd4c74f8b1e93 Mon Sep 17 00:00:00 2001 From: Wicklow <123956049+wickloww@users.noreply.github.com> Date: Fri, 31 Mar 2023 07:12:21 +0000 Subject: Feature/Add replay privacy (#5692) * Add replay settings feature * Fix replay settings behaviour * Fix tests * Fix tests * Fix tests * Update openapi doc and fix tests * Add tests and fix code * Models correction * Add migration and update controller and middleware * Add check params tests * Fix video live middleware * Updated code based on review comments --- shared/models/videos/live/live-video-create.model.ts | 2 ++ shared/models/videos/live/live-video-session.model.ts | 3 +++ shared/models/videos/live/live-video-update.model.ts | 2 ++ shared/models/videos/live/live-video.model.ts | 2 ++ 4 files changed, 9 insertions(+) (limited to 'shared/models/videos/live') diff --git a/shared/models/videos/live/live-video-create.model.ts b/shared/models/videos/live/live-video-create.model.ts index bd245dec5..f8ae9e5a9 100644 --- a/shared/models/videos/live/live-video-create.model.ts +++ b/shared/models/videos/live/live-video-create.model.ts @@ -1,4 +1,5 @@ import { VideoCreate } from '../video-create.model' +import { VideoPrivacy } from '../video-privacy.enum' import { LiveVideoLatencyMode } from './live-video-latency-mode.enum' export interface LiveVideoCreate extends VideoCreate { @@ -6,4 +7,5 @@ export interface LiveVideoCreate extends VideoCreate { latencyMode?: LiveVideoLatencyMode saveReplay?: boolean + replaySettings?: { privacy: VideoPrivacy } } diff --git a/shared/models/videos/live/live-video-session.model.ts b/shared/models/videos/live/live-video-session.model.ts index 2464e2570..888c20a8a 100644 --- a/shared/models/videos/live/live-video-session.model.ts +++ b/shared/models/videos/live/live-video-session.model.ts @@ -1,3 +1,4 @@ +import { VideoPrivacy } from '../video-privacy.enum' import { LiveVideoError } from './live-video-error.enum' export interface LiveVideoSession { @@ -11,6 +12,8 @@ export interface LiveVideoSession { saveReplay: boolean endingProcessed: boolean + replaySettings?: { privacy: VideoPrivacy } + replayVideo: { id: number uuid: string diff --git a/shared/models/videos/live/live-video-update.model.ts b/shared/models/videos/live/live-video-update.model.ts index 93bb4d30d..d6aa6fb37 100644 --- a/shared/models/videos/live/live-video-update.model.ts +++ b/shared/models/videos/live/live-video-update.model.ts @@ -1,7 +1,9 @@ +import { VideoPrivacy } from '../video-privacy.enum' import { LiveVideoLatencyMode } from './live-video-latency-mode.enum' export interface LiveVideoUpdate { permanentLive?: boolean saveReplay?: boolean + replaySettings?: { privacy: VideoPrivacy } latencyMode?: LiveVideoLatencyMode } diff --git a/shared/models/videos/live/live-video.model.ts b/shared/models/videos/live/live-video.model.ts index d0f57f883..fd8454123 100644 --- a/shared/models/videos/live/live-video.model.ts +++ b/shared/models/videos/live/live-video.model.ts @@ -1,3 +1,4 @@ +import { VideoPrivacy } from '../video-privacy.enum' import { LiveVideoLatencyMode } from './live-video-latency-mode.enum' export interface LiveVideo { @@ -7,6 +8,7 @@ export interface LiveVideo { streamKey?: string saveReplay: boolean + replaySettings?: { privacy: VideoPrivacy } permanentLive: boolean latencyMode: LiveVideoLatencyMode } -- cgit v1.2.3