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

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
17 lines
704 B
TypeScript
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
|
|
}
|