aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/shared/p2p-media-loader
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-21 12:08:47 +0200
committerChocobozzz <me@florianbigard.com>2022-07-21 12:08:47 +0200
commita77c5ff3622ab75d0c22241d0ef72053deaa7926 (patch)
treea59ae4057eb9d9e45d42d839f4f3d77686d956a3 /client/src/assets/player/shared/p2p-media-loader
parenta6c554fb6eeda7500215cca0d10930b0db4ddb0a (diff)
downloadPeerTube-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.ts5
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 @@
1import { Segment } from '@peertube/p2p-media-loader-core' 1import { Segment } from '@peertube/p2p-media-loader-core'
2import { RedundancyUrlManager } from './redundancy-url-manager' 2import { RedundancyUrlManager } from './redundancy-url-manager'
3 3
4function segmentUrlBuilderFactory (redundancyUrlManager: RedundancyUrlManager, useOriginPriority: number) { 4function 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}