diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-21 12:08:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-21 12:08:47 +0200 |
commit | a77c5ff3622ab75d0c22241d0ef72053deaa7926 (patch) | |
tree | a59ae4057eb9d9e45d42d839f4f3d77686d956a3 /client/src/assets/player/shared/p2p-media-loader | |
parent | a6c554fb6eeda7500215cca0d10930b0db4ddb0a (diff) | |
download | PeerTube-a77c5ff3622ab75d0c22241d0ef72053deaa7926.tar.gz PeerTube-a77c5ff3622ab75d0c22241d0ef72053deaa7926.tar.zst PeerTube-a77c5ff3622ab75d0c22241d0ef72053deaa7926.zip |
Fix stucked HLS player
Diffstat (limited to 'client/src/assets/player/shared/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/shared/p2p-media-loader/segment-url-builder.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/client/src/assets/player/shared/p2p-media-loader/segment-url-builder.ts b/client/src/assets/player/shared/p2p-media-loader/segment-url-builder.ts index 9d324078a..ad0e460ae 100644 --- a/client/src/assets/player/shared/p2p-media-loader/segment-url-builder.ts +++ b/client/src/assets/player/shared/p2p-media-loader/segment-url-builder.ts | |||
@@ -1,11 +1,8 @@ | |||
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, useOriginPriority: number) { | 4 | function segmentUrlBuilderFactory (redundancyUrlManager: RedundancyUrlManager) { |
5 | return function segmentBuilder (segment: Segment) { | 5 | return function segmentBuilder (segment: Segment) { |
6 | // Don't use redundancy for high priority segments | ||
7 | if (segment.priority <= useOriginPriority) return segment.url | ||
8 | |||
9 | return redundancyUrlManager.buildUrl(segment.url) | 6 | return redundancyUrlManager.buildUrl(segment.url) |
10 | } | 7 | } |
11 | } | 8 | } |