aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/shared/p2p-media-loader/segment-validator.ts')
-rw-r--r--client/src/assets/player/shared/p2p-media-loader/segment-validator.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts b/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts
index a7ee91950..3c76d63f7 100644
--- a/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts
+++ b/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts
@@ -2,6 +2,7 @@ import { basename } from 'path'
2import { Segment } from '@peertube/p2p-media-loader-core' 2import { Segment } from '@peertube/p2p-media-loader-core'
3import { logger } from '@root-helpers/logger' 3import { logger } from '@root-helpers/logger'
4import { wait } from '@root-helpers/utils' 4import { wait } from '@root-helpers/utils'
5import { removeQueryParams } from '@shared/core-utils'
5import { isSameOrigin } from '../common' 6import { isSameOrigin } from '../common'
6 7
7type SegmentsJSON = { [filename: string]: string | { [byterange: string]: string } } 8type SegmentsJSON = { [filename: string]: string | { [byterange: string]: string } }
@@ -24,7 +25,7 @@ function segmentValidatorFactory (options: {
24 // Wait for hash generation from the server 25 // Wait for hash generation from the server
25 if (isLive) await wait(1000) 26 if (isLive) await wait(1000)
26 27
27 const filename = basename(segment.url) 28 const filename = basename(removeQueryParams(segment.url))
28 29
29 const segmentValue = (await segmentsJSON)[filename] 30 const segmentValue = (await segmentsJSON)[filename]
30 31