From bb4ba6d94c5051fdd665ebe63fffcc105778b8be Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 3 Dec 2020 14:10:54 +0100 Subject: Add permanent live support --- server/controllers/api/videos/index.ts | 2 +- server/controllers/api/videos/live.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 0dcd38ad2..71a0f97e2 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts @@ -174,7 +174,7 @@ function listVideoPrivacies (req: express.Request, res: express.Response) { } async function addVideo (req: express.Request, res: express.Response) { - // Transferring the video could be long + // Uploading the video could be long // Set timeout to 10 minutes, as Express's default is 2 minutes req.setTimeout(1000 * 60 * 10, () => { logger.error('Upload video has timed out.') diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts index a6f00c1bd..e67d89612 100644 --- a/server/controllers/api/videos/live.ts +++ b/server/controllers/api/videos/live.ts @@ -67,7 +67,9 @@ async function updateLiveVideo (req: express.Request, res: express.Response) { const video = res.locals.videoAll const videoLive = res.locals.videoLive + videoLive.saveReplay = body.saveReplay || false + videoLive.permanentLive = body.permanentLive || false video.VideoLive = await videoLive.save() @@ -90,6 +92,7 @@ async function addLiveVideo (req: express.Request, res: express.Response) { const videoLive = new VideoLiveModel() videoLive.saveReplay = videoInfo.saveReplay || false + videoLive.permanentLive = videoInfo.permanentLive || false videoLive.streamKey = uuidv4() const [ thumbnailModel, previewModel ] = await buildVideoThumbnailsFromReq({ -- cgit v1.2.3