1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00
Peertube/server/core/lib/video-urls.ts
Chocobozzz 05f105d03f
Remove web video redundancy support
It's not used anymore in the player since several major versions now, so
there's no point in continuing to store these video files
2025-01-31 11:13:13 +01:00

17 lines
704 B
TypeScript

import { STATIC_PATHS, WEBSERVER } from '@server/initializers/constants.js'
import { MStreamingPlaylist, MVideo, MVideoFile, MVideoUUID } from '@server/types/models/index.js'
// ################## Redundancy ##################
export function generateHLSRedundancyUrl (video: MVideo, playlist: MStreamingPlaylist) {
// Base URL used by our HLS player
return WEBSERVER.URL + STATIC_PATHS.REDUNDANCY + playlist.getStringType() + '/' + video.uuid
}
// ################## Meta data ##################
export function getLocalVideoFileMetadataUrl (video: MVideoUUID, videoFile: MVideoFile) {
const path = '/api/v1/videos/'
return WEBSERVER.URL + path + video.uuid + '/metadata/' + videoFile.id
}