1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Fix HLS re transcoding with object storage enabled

This commit is contained in:
Chocobozzz 2022-02-01 14:19:44 +01:00
parent 0f11ec8dd3
commit a2caee9f51
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 119 additions and 19 deletions

View file

@ -14,7 +14,7 @@ import {
setAccessTokensToServers,
waitJobs
} from '@shared/server-commands'
import { expectStartWith } from '../shared'
import { checkResolutionsInMasterPlaylist, expectStartWith } from '../shared'
const expect = chai.expect
@ -163,11 +163,18 @@ function runTests (objectStorage: boolean) {
expect(videoDetails.streamingPlaylists).to.have.lengthOf(1)
const files = videoDetails.streamingPlaylists[0].files
const hlsPlaylist = videoDetails.streamingPlaylists[0]
const files = hlsPlaylist.files
expect(files).to.have.lengthOf(1)
expect(files[0].resolution.id).to.equal(480)
if (objectStorage) await checkFilesInObjectStorage(files, 'playlist')
if (objectStorage) {
await checkFilesInObjectStorage(files, 'playlist')
const resolutions = files.map(f => f.resolution.id)
await checkResolutionsInMasterPlaylist({ server, playlistUrl: hlsPlaylist.playlistUrl, resolutions })
}
}
})