1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Prefer web videos in favour of webtorrent

This commit is contained in:
Chocobozzz 2023-07-11 09:21:13 +02:00
parent c3030e944a
commit 784e2ad5c3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
102 changed files with 579 additions and 570 deletions

View file

@ -9,7 +9,7 @@ function getInternalUrl (config: BucketInfo, keyWithoutPrefix: string) {
// ---------------------------------------------------------------------------
function getWebTorrentPublicFileUrl (fileUrl: string) {
function getWebVideoPublicFileUrl (fileUrl: string) {
const baseUrl = CONFIG.OBJECT_STORAGE.VIDEOS.BASE_URL
if (!baseUrl) return fileUrl
@ -29,7 +29,7 @@ function getHLSPrivateFileUrl (video: MVideoUUID, filename: string) {
return WEBSERVER.URL + OBJECT_STORAGE_PROXY_PATHS.STREAMING_PLAYLISTS.PRIVATE_HLS + video.uuid + `/${filename}`
}
function getWebTorrentPrivateFileUrl (filename: string) {
function getWebVideoPrivateFileUrl (filename: string) {
return WEBSERVER.URL + OBJECT_STORAGE_PROXY_PATHS.PRIVATE_WEBSEED + filename
}
@ -38,11 +38,11 @@ function getWebTorrentPrivateFileUrl (filename: string) {
export {
getInternalUrl,
getWebTorrentPublicFileUrl,
getWebVideoPublicFileUrl,
getHLSPublicFileUrl,
getHLSPrivateFileUrl,
getWebTorrentPrivateFileUrl,
getWebVideoPrivateFileUrl,
replaceByBaseUrl
}