diff options
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 | } |