aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /shared/extra-utils/videos/live.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'shared/extra-utils/videos/live.ts')
-rw-r--r--shared/extra-utils/videos/live.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/extra-utils/videos/live.ts b/shared/extra-utils/videos/live.ts
index 353595811..502964b1a 100644
--- a/shared/extra-utils/videos/live.ts
+++ b/shared/extra-utils/videos/live.ts
@@ -5,7 +5,7 @@ import * as ffmpeg from 'fluent-ffmpeg'
5import { pathExists, readdir } from 'fs-extra' 5import { pathExists, readdir } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { buildAbsoluteFixturePath, wait } from '../miscs' 7import { buildAbsoluteFixturePath, wait } from '../miscs'
8import { ServerInfo } from '../server/servers' 8import { PeerTubeServer } from '../server/server'
9 9
10function sendRTMPStream (rtmpBaseUrl: string, streamKey: string, fixtureName = 'video_short.mp4') { 10function sendRTMPStream (rtmpBaseUrl: string, streamKey: string, fixtureName = 'video_short.mp4') {
11 const fixture = buildAbsoluteFixturePath(fixtureName) 11 const fixture = buildAbsoluteFixturePath(fixtureName)
@@ -70,13 +70,13 @@ async function stopFfmpeg (command: ffmpeg.FfmpegCommand) {
70 await wait(500) 70 await wait(500)
71} 71}
72 72
73async function waitUntilLivePublishedOnAllServers (servers: ServerInfo[], videoId: string) { 73async function waitUntilLivePublishedOnAllServers (servers: PeerTubeServer[], videoId: string) {
74 for (const server of servers) { 74 for (const server of servers) {
75 await server.live.waitUntilPublished({ videoId }) 75 await server.live.waitUntilPublished({ videoId })
76 } 76 }
77} 77}
78 78
79async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) { 79async function checkLiveCleanup (server: PeerTubeServer, videoUUID: string, resolutions: number[] = []) {
80 const basePath = server.servers.buildDirectory('streaming-playlists') 80 const basePath = server.servers.buildDirectory('streaming-playlists')
81 const hlsPath = join(basePath, 'hls', videoUUID) 81 const hlsPath = join(basePath, 'hls', videoUUID)
82 82