diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-11 09:21:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-11 09:21:13 +0200 |
commit | 784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428 (patch) | |
tree | 29c46cfd6344065eb805680ed080cb05592ee1d4 /server/lib/object-storage/proxy.ts | |
parent | c3030e944ad03c7fd7b5d668a2d88ff03e4cdf19 (diff) | |
download | PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.tar.gz PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.tar.zst PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.zip |
Prefer web videos in favour of webtorrent
Diffstat (limited to 'server/lib/object-storage/proxy.ts')
-rw-r--r-- | server/lib/object-storage/proxy.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/object-storage/proxy.ts b/server/lib/object-storage/proxy.ts index c782a8a25..c09a0d1b0 100644 --- a/server/lib/object-storage/proxy.ts +++ b/server/lib/object-storage/proxy.ts | |||
@@ -7,19 +7,19 @@ import { StreamReplacer } from '@server/helpers/stream-replacer' | |||
7 | import { MStreamingPlaylist, MVideo } from '@server/types/models' | 7 | import { MStreamingPlaylist, MVideo } from '@server/types/models' |
8 | import { HttpStatusCode } from '@shared/models' | 8 | import { HttpStatusCode } from '@shared/models' |
9 | import { injectQueryToPlaylistUrls } from '../hls' | 9 | import { injectQueryToPlaylistUrls } from '../hls' |
10 | import { getHLSFileReadStream, getWebTorrentFileReadStream } from './videos' | 10 | import { getHLSFileReadStream, getWebVideoFileReadStream } from './videos' |
11 | 11 | ||
12 | export async function proxifyWebTorrentFile (options: { | 12 | export async function proxifyWebVideoFile (options: { |
13 | req: express.Request | 13 | req: express.Request |
14 | res: express.Response | 14 | res: express.Response |
15 | filename: string | 15 | filename: string |
16 | }) { | 16 | }) { |
17 | const { req, res, filename } = options | 17 | const { req, res, filename } = options |
18 | 18 | ||
19 | logger.debug('Proxifying WebTorrent file %s from object storage.', filename) | 19 | logger.debug('Proxifying Web Video file %s from object storage.', filename) |
20 | 20 | ||
21 | try { | 21 | try { |
22 | const { response: s3Response, stream } = await getWebTorrentFileReadStream({ | 22 | const { response: s3Response, stream } = await getWebVideoFileReadStream({ |
23 | filename, | 23 | filename, |
24 | rangeHeader: req.header('range') | 24 | rangeHeader: req.header('range') |
25 | }) | 25 | }) |