aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/live.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos/live.ts')
-rw-r--r--shared/extra-utils/videos/live.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/shared/extra-utils/videos/live.ts b/shared/extra-utils/videos/live.ts
index 4bfcc583e..85c83c5bb 100644
--- a/shared/extra-utils/videos/live.ts
+++ b/shared/extra-utils/videos/live.ts
@@ -53,15 +53,15 @@ function createLive (url: string, token: string, fields: LiveVideoCreate, status
53 }) 53 })
54} 54}
55 55
56async function sendRTMPStreamInVideo (url: string, token: string, videoId: number | string) { 56async function sendRTMPStreamInVideo (url: string, token: string, videoId: number | string, fixtureName?: string) {
57 const res = await getLive(url, token, videoId) 57 const res = await getLive(url, token, videoId)
58 const videoLive = res.body as LiveVideo 58 const videoLive = res.body as LiveVideo
59 59
60 return sendRTMPStream(videoLive.rtmpUrl, videoLive.streamKey) 60 return sendRTMPStream(videoLive.rtmpUrl, videoLive.streamKey, fixtureName)
61} 61}
62 62
63function sendRTMPStream (rtmpBaseUrl: string, streamKey: string) { 63function sendRTMPStream (rtmpBaseUrl: string, streamKey: string, fixtureName = 'video_short.mp4') {
64 const fixture = buildAbsoluteFixturePath('video_short.mp4') 64 const fixture = buildAbsoluteFixturePath(fixtureName)
65 65
66 const command = ffmpeg(fixture) 66 const command = ffmpeg(fixture)
67 command.inputOption('-stream_loop -1') 67 command.inputOption('-stream_loop -1')
@@ -140,7 +140,7 @@ async function waitUntilLiveStarts (url: string, token: string, videoId: number
140} 140}
141 141
142async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) { 142async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) {
143 const basePath = buildServerDirectory(server.internalServerNumber, 'streaming-playlists') 143 const basePath = buildServerDirectory(server, 'streaming-playlists')
144 const hlsPath = join(basePath, 'hls', videoUUID) 144 const hlsPath = join(basePath, 'hls', videoUUID)
145 145
146 if (resolutions.length === 0) { 146 if (resolutions.length === 0) {