From 501af82d999a79e277f87794f6296d0e3495775c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 12 Nov 2020 17:13:32 +0100 Subject: Delay notification when waiting for a live --- client/src/assets/player/p2p-media-loader/segment-validator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/src/assets/player/p2p-media-loader/segment-validator.ts b/client/src/assets/player/p2p-media-loader/segment-validator.ts index 844956d6a..4a0caec5e 100644 --- a/client/src/assets/player/p2p-media-loader/segment-validator.ts +++ b/client/src/assets/player/p2p-media-loader/segment-validator.ts @@ -10,7 +10,7 @@ function segmentValidatorFactory (segmentsSha256Url: string, isLive: boolean) { let segmentsJSON = fetchSha256Segments(segmentsSha256Url) const regex = /bytes=(\d+)-(\d+)/ - return async function segmentValidator (segment: Segment, retry = 1) { + return async function segmentValidator (segment: Segment, _method: string, _peerId: string, retry = 1) { // Wait for hash generation from the server if (isLive) await wait(1000) @@ -28,7 +28,7 @@ function segmentValidatorFactory (segmentsSha256Url: string, isLive: boolean) { await wait(1000) segmentsJSON = fetchSha256Segments(segmentsSha256Url) - await segmentValidator(segment, retry + 1) + await segmentValidator(segment, _method, _peerId, retry + 1) return } -- cgit v1.2.3