aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/lib/live/live-manager.ts1
-rw-r--r--server/tests/api/live/live-permanent.ts6
2 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts
index b3bf5a999..33e49acc1 100644
--- a/server/lib/live/live-manager.ts
+++ b/server/lib/live/live-manager.ts
@@ -343,6 +343,7 @@ class LiveManager {
343 logger.info('Will publish and federate live %s.', video.url, localLTags) 343 logger.info('Will publish and federate live %s.', video.url, localLTags)
344 344
345 video.state = VideoState.PUBLISHED 345 video.state = VideoState.PUBLISHED
346 video.publishedAt = new Date()
346 await video.save() 347 await video.save()
347 348
348 live.Video = video 349 live.Video = video
diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts
index f07d4cfec..c5f942901 100644
--- a/server/tests/api/live/live-permanent.ts
+++ b/server/tests/api/live/live-permanent.ts
@@ -101,6 +101,7 @@ describe('Permanent live', function () {
101 it('Should stream into this permanent live', async function () { 101 it('Should stream into this permanent live', async function () {
102 this.timeout(120000) 102 this.timeout(120000)
103 103
104 const beforePublication = new Date()
104 const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUID }) 105 const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUID })
105 106
106 for (const server of servers) { 107 for (const server of servers) {
@@ -109,6 +110,11 @@ describe('Permanent live', function () {
109 110
110 await checkVideoState(videoUUID, VideoState.PUBLISHED) 111 await checkVideoState(videoUUID, VideoState.PUBLISHED)
111 112
113 for (const server of servers) {
114 const video = await server.videos.get({ id: videoUUID })
115 expect(new Date(video.publishedAt)).greaterThan(beforePublication)
116 }
117
112 await stopFfmpeg(ffmpegCommand) 118 await stopFfmpeg(ffmpegCommand)
113 await servers[0].live.waitUntilWaiting({ videoId: videoUUID }) 119 await servers[0].live.waitUntilWaiting({ videoId: videoUUID })
114 120