mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Add live server hooks
This commit is contained in:
parent
c8f3cfeba7
commit
3cabf3532b
9 changed files with 133 additions and 32 deletions
|
@ -5,6 +5,7 @@ import { CONFIG } from '@server/initializers/config'
|
|||
import { ASSETS_PATH, MIMETYPES } from '@server/initializers/constants'
|
||||
import { getVideoActivityPubUrl } from '@server/lib/activitypub/url'
|
||||
import { federateVideoIfNeeded } from '@server/lib/activitypub/videos'
|
||||
import { Hooks } from '@server/lib/plugins/hooks'
|
||||
import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video'
|
||||
import { videoLiveAddValidator, videoLiveGetValidator, videoLiveUpdateValidator } from '@server/middlewares/validators/videos/video-live'
|
||||
import { VideoLiveModel } from '@server/models/video/video-live'
|
||||
|
@ -128,6 +129,8 @@ async function addLiveVideo (req: express.Request, res: express.Response) {
|
|||
return { videoCreated }
|
||||
})
|
||||
|
||||
Hooks.runAction('action:api.live-video.created', { video: videoCreated })
|
||||
|
||||
return res.json({
|
||||
video: {
|
||||
id: videoCreated.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue