+ it('Should reinject video file token on permanent live', async function () {
+ this.timeout(240000)
+
+ const ffmpegCommand = sendRTMPStream({ rtmpBaseUrl: permanentLive.rtmpUrl, streamKey: permanentLive.streamKey })
+ await server.live.waitUntilPublished({ videoId: permanentLiveId })
+
+ const video = await server.videos.getWithToken({ id: permanentLiveId })
+ const videoFileToken = await server.videoToken.getVideoFileToken({ videoId: video.uuid })
+ const hls = video.streamingPlaylists[0]
+
+ {
+ const query = { videoFileToken }
+ const { text } = await makeRawRequest({ url: hls.playlistUrl, query, expectedStatus: HttpStatusCode.OK_200 })
+
+ expect(text).to.not.include(videoFileToken)
+ }
+
+ {
+ await checkVideoFileTokenReinjection({
+ server,
+ videoUUID: permanentLiveId,
+ videoFileToken,
+ resolutions: [ 720 ],
+ isLive: true
+ })
+ }
+
+ await stopFfmpeg(ffmpegCommand)
+ })
+