/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
-import * as chai from 'chai'
import { omit } from 'lodash'
import { join } from 'path'
import { LiveVideo, VideoPrivacy } from '@shared/models'
immutableAssign,
makePostBodyRequest,
makeUploadRequest,
+ runAndTestFfmpegStreamError,
sendRTMPStream,
ServerInfo,
setAccessTokensToServers,
const path = '/api/v1/videos/live'
let server: ServerInfo
let userAccessToken = ''
- let accountName: string
let channelId: number
- let channelName: string
let videoId: number
let videoIdNotLive: number
await stopFfmpeg(command)
})
+
+ it('Should fail to stream twice in the save live', async function () {
+ this.timeout(30000)
+
+ const resLive = await getLive(server.url, server.accessToken, videoId)
+ const live: LiveVideo = resLive.body
+
+ const command = sendRTMPStream(live.rtmpUrl, live.streamKey)
+
+ await waitUntilLiveStarts(server.url, server.accessToken, videoId)
+
+ await runAndTestFfmpegStreamError(server.url, server.accessToken, videoId, true)
+
+ await stopFfmpeg(command)
+ })
})
after(async function () {