aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-04 13:40:02 +0100
committerChocobozzz <chocobozzz@cpy.re>2022-03-09 09:23:10 +0100
commitf443a74649174b2f9347c158e30f8ac7aa3e958a (patch)
treee423bc4e2307477bda4341037b7fa04ad10adae6 /server/tests/api/live
parent01dd04cd5ab7b55d2a9af7d0ebf405bee9579b09 (diff)
downloadPeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.tar.gz
PeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.tar.zst
PeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.zip
Add latency setting support
Diffstat (limited to 'server/tests/api/live')
-rw-r--r--server/tests/api/live/live.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts
index d756a02c1..aeb039696 100644
--- a/server/tests/api/live/live.ts
+++ b/server/tests/api/live/live.ts
@@ -10,6 +10,7 @@ import {
10 HttpStatusCode, 10 HttpStatusCode,
11 LiveVideo, 11 LiveVideo,
12 LiveVideoCreate, 12 LiveVideoCreate,
13 LiveVideoLatencyMode,
13 VideoDetails, 14 VideoDetails,
14 VideoPrivacy, 15 VideoPrivacy,
15 VideoState, 16 VideoState,
@@ -52,6 +53,9 @@ describe('Test live', function () {
52 live: { 53 live: {
53 enabled: true, 54 enabled: true,
54 allowReplay: true, 55 allowReplay: true,
56 latencySetting: {
57 enabled: true
58 },
55 transcoding: { 59 transcoding: {
56 enabled: false 60 enabled: false
57 } 61 }
@@ -85,6 +89,7 @@ describe('Test live', function () {
85 commentsEnabled: false, 89 commentsEnabled: false,
86 downloadEnabled: false, 90 downloadEnabled: false,
87 saveReplay: true, 91 saveReplay: true,
92 latencyMode: LiveVideoLatencyMode.SMALL_LATENCY,
88 privacy: VideoPrivacy.PUBLIC, 93 privacy: VideoPrivacy.PUBLIC,
89 previewfile: 'video_short1-preview.webm.jpg', 94 previewfile: 'video_short1-preview.webm.jpg',
90 thumbnailfile: 'video_short1.webm.jpg' 95 thumbnailfile: 'video_short1.webm.jpg'
@@ -131,6 +136,7 @@ describe('Test live', function () {
131 } 136 }
132 137
133 expect(live.saveReplay).to.be.true 138 expect(live.saveReplay).to.be.true
139 expect(live.latencyMode).to.equal(LiveVideoLatencyMode.SMALL_LATENCY)
134 } 140 }
135 }) 141 })
136 142
@@ -175,7 +181,7 @@ describe('Test live', function () {
175 it('Should update the live', async function () { 181 it('Should update the live', async function () {
176 this.timeout(10000) 182 this.timeout(10000)
177 183
178 await commands[0].update({ videoId: liveVideoUUID, fields: { saveReplay: false } }) 184 await commands[0].update({ videoId: liveVideoUUID, fields: { saveReplay: false, latencyMode: LiveVideoLatencyMode.DEFAULT } })
179 await waitJobs(servers) 185 await waitJobs(servers)
180 }) 186 })
181 187
@@ -192,6 +198,7 @@ describe('Test live', function () {
192 } 198 }
193 199
194 expect(live.saveReplay).to.be.false 200 expect(live.saveReplay).to.be.false
201 expect(live.latencyMode).to.equal(LiveVideoLatencyMode.DEFAULT)
195 } 202 }
196 }) 203 })
197 204