import { readdir } from 'fs-extra'
import { omit } from 'lodash'
import { join } from 'path'
-import { HttpStatusCode } from '@shared/models'
-import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, VideoCreateResult, VideoDetails, VideoState } from '@shared/models'
+import { HttpStatusCode, LiveVideo, LiveVideoCreate, LiveVideoUpdate, VideoCreateResult, VideoDetails, VideoState } from '@shared/models'
import { wait } from '../miscs'
import { unwrapBody } from '../requests'
import { AbstractCommand, OverrideCommandOptions } from '../shared'
async sendRTMPStreamInVideo (options: OverrideCommandOptions & {
videoId: number | string
fixtureName?: string
+ copyCodecs?: boolean
}) {
- const { videoId, fixtureName } = options
+ const { videoId, fixtureName, copyCodecs } = options
const videoLive = await this.get({ videoId })
- return sendRTMPStream(videoLive.rtmpUrl, videoLive.streamKey, fixtureName)
+ return sendRTMPStream({ rtmpBaseUrl: videoLive.rtmpUrl, streamKey: videoLive.streamKey, fixtureName, copyCodecs })
}
async runAndTestStreamError (options: OverrideCommandOptions & {
video = await this.server.videos.getWithToken({ token: options.token, id: options.videoId })
await wait(500)
- } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED)
+ } while (video.isLive === true || video.state.id !== VideoState.PUBLISHED)
}
async countPlaylists (options: OverrideCommandOptions & {