1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +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

@ -7,19 +7,19 @@ import { StreamReplacer } from '@server/helpers/stream-replacer'
import { MStreamingPlaylist, MVideo } from '@server/types/models'
import { HttpStatusCode } from '@shared/models'
import { injectQueryToPlaylistUrls } from '../hls'
import { getHLSFileReadStream, getWebTorrentFileReadStream } from './videos'
import { getHLSFileReadStream, getWebVideoFileReadStream } from './videos'
export async function proxifyWebTorrentFile (options: {
export async function proxifyWebVideoFile (options: {
req: express.Request
res: express.Response
filename: string
}) {
const { req, res, filename } = options
logger.debug('Proxifying WebTorrent file %s from object storage.', filename)
logger.debug('Proxifying Web Video file %s from object storage.', filename)
try {
const { response: s3Response, stream } = await getWebTorrentFileReadStream({
const { response: s3Response, stream } = await getWebVideoFileReadStream({
filename,
rangeHeader: req.header('range')
})