aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/live/live.ts')
-rw-r--r--server/tests/api/live/live.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts
index 003cc934f..ceb606af1 100644
--- a/server/tests/api/live/live.ts
+++ b/server/tests/api/live/live.ts
@@ -87,6 +87,7 @@ describe('Test live', function () {
87 commentsEnabled: false, 87 commentsEnabled: false,
88 downloadEnabled: false, 88 downloadEnabled: false,
89 saveReplay: true, 89 saveReplay: true,
90 replaySettings: { privacy: VideoPrivacy.PUBLIC },
90 latencyMode: LiveVideoLatencyMode.SMALL_LATENCY, 91 latencyMode: LiveVideoLatencyMode.SMALL_LATENCY,
91 privacy: VideoPrivacy.PUBLIC, 92 privacy: VideoPrivacy.PUBLIC,
92 previewfile: 'video_short1-preview.webm.jpg', 93 previewfile: 'video_short1-preview.webm.jpg',
@@ -128,6 +129,9 @@ describe('Test live', function () {
128 if (server.url === servers[0].url) { 129 if (server.url === servers[0].url) {
129 expect(live.rtmpUrl).to.equal('rtmp://' + server.hostname + ':' + servers[0].rtmpPort + '/live') 130 expect(live.rtmpUrl).to.equal('rtmp://' + server.hostname + ':' + servers[0].rtmpPort + '/live')
130 expect(live.streamKey).to.not.be.empty 131 expect(live.streamKey).to.not.be.empty
132
133 expect(live.replaySettings).to.exist
134 expect(live.replaySettings.privacy).to.equal(VideoPrivacy.PUBLIC)
131 } else { 135 } else {
132 expect(live.rtmpUrl).to.not.exist 136 expect(live.rtmpUrl).to.not.exist
133 expect(live.streamKey).to.not.exist 137 expect(live.streamKey).to.not.exist
@@ -196,6 +200,7 @@ describe('Test live', function () {
196 } 200 }
197 201
198 expect(live.saveReplay).to.be.false 202 expect(live.saveReplay).to.be.false
203 expect(live.replaySettings).to.not.exist
199 expect(live.latencyMode).to.equal(LiveVideoLatencyMode.DEFAULT) 204 expect(live.latencyMode).to.equal(LiveVideoLatencyMode.DEFAULT)
200 } 205 }
201 }) 206 })
@@ -366,7 +371,10 @@ describe('Test live', function () {
366 name: 'live video', 371 name: 'live video',
367 channelId: servers[0].store.channel.id, 372 channelId: servers[0].store.channel.id,
368 privacy: VideoPrivacy.PUBLIC, 373 privacy: VideoPrivacy.PUBLIC,
369 saveReplay 374 saveReplay,
375 replaySettings: saveReplay
376 ? { privacy: VideoPrivacy.PUBLIC }
377 : undefined
370 } 378 }
371 379
372 const { uuid } = await commands[0].create({ fields: liveAttributes }) 380 const { uuid } = await commands[0].create({ fields: liveAttributes })
@@ -670,6 +678,9 @@ describe('Test live', function () {
670 channelId: servers[0].store.channel.id, 678 channelId: servers[0].store.channel.id,
671 privacy: VideoPrivacy.PUBLIC, 679 privacy: VideoPrivacy.PUBLIC,
672 saveReplay: options.saveReplay, 680 saveReplay: options.saveReplay,
681 replaySettings: options.saveReplay
682 ? { privacy: VideoPrivacy.PUBLIC }
683 : undefined,
673 permanentLive: options.permanent 684 permanentLive: options.permanent
674 } 685 }
675 686