aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-10 13:49:19 +0100
committerChocobozzz <me@florianbigard.com>2021-12-10 13:51:44 +0100
commitd17d743051c5716e1e08cd8870d718cfd6a57f0c (patch)
tree2f8c8d1a08467f35c5ede18001fc18cb2bafafef /server/controllers/api/videos/live.ts
parent8cf43a6524d354fbfa0f0eaf789e8d4756bd25d6 (diff)
downloadPeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.tar.gz
PeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.tar.zst
PeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.zip
Add upload/import/go live video attributes hooks
Diffstat (limited to 'server/controllers/api/videos/live.ts')
-rw-r--r--server/controllers/api/videos/live.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts
index e29615ff5..3e1480cf2 100644
--- a/server/controllers/api/videos/live.ts
+++ b/server/controllers/api/videos/live.ts
@@ -83,7 +83,9 @@ async function addLiveVideo (req: express.Request, res: express.Response) {
83 const videoInfo: LiveVideoCreate = req.body 83 const videoInfo: LiveVideoCreate = req.body
84 84
85 // Prepare data so we don't block the transaction 85 // Prepare data so we don't block the transaction
86 const videoData = buildLocalVideoFromReq(videoInfo, res.locals.videoChannel.id) 86 let videoData = buildLocalVideoFromReq(videoInfo, res.locals.videoChannel.id)
87 videoData = await Hooks.wrapObject(videoData, 'filter:api.video.live.video-attribute.result')
88
87 videoData.isLive = true 89 videoData.isLive = true
88 videoData.state = VideoState.WAITING_FOR_LIVE 90 videoData.state = VideoState.WAITING_FOR_LIVE
89 videoData.duration = 0 91 videoData.duration = 0