diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-22 13:44:12 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-22 13:44:12 +0100 |
commit | ac5f679ad60fc48db6d9a9534a8ac5fd20eda36f (patch) | |
tree | 7acf66762539331129a70e45c2a40fadec74a3fd /client/src/assets/player/p2p-media-loader | |
parent | 89e3de8dc6dbe3c78aefb5f43e0feffd97b1af02 (diff) | |
download | PeerTube-ac5f679ad60fc48db6d9a9534a8ac5fd20eda36f.tar.gz PeerTube-ac5f679ad60fc48db6d9a9534a8ac5fd20eda36f.tar.zst PeerTube-ac5f679ad60fc48db6d9a9534a8ac5fd20eda36f.zip |
Fix HLS buffer
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/segment-url-builder.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/assets/player/p2p-media-loader/segment-url-builder.ts b/client/src/assets/player/p2p-media-loader/segment-url-builder.ts index 5ddc81ff6..9d324078a 100644 --- a/client/src/assets/player/p2p-media-loader/segment-url-builder.ts +++ b/client/src/assets/player/p2p-media-loader/segment-url-builder.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Segment } from '@peertube/p2p-media-loader-core' | 1 | import { Segment } from '@peertube/p2p-media-loader-core' |
2 | import { RedundancyUrlManager } from './redundancy-url-manager' | 2 | import { RedundancyUrlManager } from './redundancy-url-manager' |
3 | 3 | ||
4 | function segmentUrlBuilderFactory (redundancyUrlManager: RedundancyUrlManager, requiredSegmentsPriority: number) { | 4 | function segmentUrlBuilderFactory (redundancyUrlManager: RedundancyUrlManager, useOriginPriority: number) { |
5 | return function segmentBuilder (segment: Segment) { | 5 | return function segmentBuilder (segment: Segment) { |
6 | // Don't use redundancy for high priority segments | 6 | // Don't use redundancy for high priority segments |
7 | if (segment.priority <= requiredSegmentsPriority) return segment.url | 7 | if (segment.priority <= useOriginPriority) return segment.url |
8 | 8 | ||
9 | return redundancyUrlManager.buildUrl(segment.url) | 9 | return redundancyUrlManager.buildUrl(segment.url) |
10 | } | 10 | } |