import { expect } from 'chai'
import { pathExists, readdir } from 'fs-extra'
import { join } from 'path'
-import { wait } from '@shared/core-utils'
import { LiveVideo, VideoStreamingPlaylistType } from '@shared/models'
import { ObjectStorageCommand, PeerTubeServer } from '@shared/server-commands'
import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist } from './streaming-playlists'
expect(hlsPlaylist).to.exist
expect(hlsPlaylist.files).to.have.lengthOf(0) // Only fragmented mp4 files are displayed
- await checkResolutionsInMasterPlaylist({ server, playlistUrl: hlsPlaylist.playlistUrl, resolutions, transcoded })
+ await checkResolutionsInMasterPlaylist({
+ server,
+ playlistUrl: hlsPlaylist.playlistUrl,
+ resolutions,
+ transcoded,
+ withRetry: objectStorage
+ })
if (objectStorage) {
expect(hlsPlaylist.playlistUrl).to.contain(ObjectStorageCommand.getPlaylistBaseUrl())
if (objectStorage) {
await originServer.live.waitUntilSegmentUpload({ playlistNumber: i, segment: segmentNum })
- await wait(1000)
expect(hlsPlaylist.segmentsSha256Url).to.contain(ObjectStorageCommand.getPlaylistBaseUrl())
}
playlistUrl: string
resolutions: number[]
transcoded?: boolean // default true
+ withRetry?: boolean // default false
}) {
- const { server, playlistUrl, resolutions, transcoded = true } = options
+ const { server, playlistUrl, resolutions, withRetry = false, transcoded = true } = options
- const masterPlaylist = await server.streamingPlaylists.get({ url: playlistUrl })
+ const masterPlaylist = await server.streamingPlaylists.get({ url: playlistUrl, withRetry })
for (const resolution of resolutions) {
const reg = transcoded
import ffmpeg, { FfmpegCommand } from 'fluent-ffmpeg'
import { buildAbsoluteFixturePath, wait } from '@shared/core-utils'
-import { PeerTubeServer } from '../server/server'
import { VideoDetails, VideoInclude } from '@shared/models'
+import { PeerTubeServer } from '../server/server'
function sendRTMPStream (options: {
rtmpBaseUrl: string