diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-22 13:48:09 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-22 13:48:09 +0100 |
commit | f7298d0dcc247fe3be94ec1e00351942a079a44b (patch) | |
tree | 6bcb9935ab00101115be003c988a8211fc260d8c /client/src/assets/player/p2p-media-loader | |
parent | 0d9a327df33e42a0f34caaf2cbff5f74e4d78426 (diff) | |
parent | ac5f679ad60fc48db6d9a9534a8ac5fd20eda36f (diff) | |
download | PeerTube-f7298d0dcc247fe3be94ec1e00351942a079a44b.tar.gz PeerTube-f7298d0dcc247fe3be94ec1e00351942a079a44b.tar.zst PeerTube-f7298d0dcc247fe3be94ec1e00351942a079a44b.zip |
Merge branch 'release/4.1.0' into develop
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 | } |