import { STATIC_PATHS , WEBSERVER } from '@server/initializers/constants' ; import { MStreamingPlaylist , MVideo , MVideoFile , MVideoUUID } from '@server/types/models' ; function generateHLSRedundancyUrl ( video , playlist ) { return WEBSERVER . URL + STATIC_PATHS . REDUNDANCY + playlist . getStringType ( ) + '/' + video . uuid ; } function generateWebTorrentRedundancyUrl ( file ) { return WEBSERVER . URL + STATIC_PATHS . REDUNDANCY + file . filename ; } function getLocalVideoFileMetadataUrl ( video , videoFile ) { const path = '/api/v1/videos/' ; return WEBSERVER . URL + path + video . uuid + '/metadata/' + videoFile . id ; } export { getLocalVideoFileMetadataUrl , generateWebTorrentRedundancyUrl , generateHLSRedundancyUrl } ;