]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Wait segment sha processing
authorChocobozzz <me@florianbigard.com>
Tue, 11 Oct 2022 15:10:53 +0000 (17:10 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 11 Oct 2022 15:14:54 +0000 (17:14 +0200)
server/tests/api/live/live.ts
shared/server-commands/videos/live-command.ts

index 0a7ae8536da87ef839381b10cb9a0a0423d53044..3f2a304bee68bcc65889669c2ec8892fab86f014 100644 (file)
@@ -519,7 +519,7 @@ describe('Test live', function () {
       }
 
       const minBitrateLimits = {
-        720: 5000 * 1000,
+        720: 4800 * 1000,
         360: 1000 * 1000,
         240: 550 * 1000
       }
index a0e0c7c8fb1a4c3ec08fc3029e36fc5fefbea55c..b163f7189e301d50958cc44e434c6777662735f6 100644 (file)
@@ -186,6 +186,15 @@ export class LiveCommand extends AbstractCommand {
           defaultExpectedStatus: HttpStatusCode.OK_200
         })
 
+        const video = await server.videos.get({ id: videoUUID })
+        const hlsPlaylist = video.streamingPlaylists[0]
+
+        const shaBody = await server.streamingPlaylists.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url })
+
+        if (!shaBody[segmentName]) {
+          throw new Error('Segment SHA does not exist')
+        }
+
         error = false
       } catch {
         error = true