aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-12 17:13:32 +0100
committerChocobozzz <me@florianbigard.com>2020-11-12 17:13:32 +0100
commit501af82d999a79e277f87794f6296d0e3495775c (patch)
tree1ba78d7c59446176d0ebf5a5bfb86c54859d09f1 /client
parent2122606318bf208262d1573ab8d9a772cd697448 (diff)
downloadPeerTube-501af82d999a79e277f87794f6296d0e3495775c.tar.gz
PeerTube-501af82d999a79e277f87794f6296d0e3495775c.tar.zst
PeerTube-501af82d999a79e277f87794f6296d0e3495775c.zip
Delay notification when waiting for a live
Diffstat (limited to 'client')
-rw-r--r--client/src/assets/player/p2p-media-loader/segment-validator.ts4
1 files changed, 2 insertions, 2 deletions
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) {
10 let segmentsJSON = fetchSha256Segments(segmentsSha256Url) 10 let segmentsJSON = fetchSha256Segments(segmentsSha256Url)
11 const regex = /bytes=(\d+)-(\d+)/ 11 const regex = /bytes=(\d+)-(\d+)/
12 12
13 return async function segmentValidator (segment: Segment, retry = 1) { 13 return async function segmentValidator (segment: Segment, _method: string, _peerId: string, retry = 1) {
14 // Wait for hash generation from the server 14 // Wait for hash generation from the server
15 if (isLive) await wait(1000) 15 if (isLive) await wait(1000)
16 16
@@ -28,7 +28,7 @@ function segmentValidatorFactory (segmentsSha256Url: string, isLive: boolean) {
28 await wait(1000) 28 await wait(1000)
29 29
30 segmentsJSON = fetchSha256Segments(segmentsSha256Url) 30 segmentsJSON = fetchSha256Segments(segmentsSha256Url)
31 await segmentValidator(segment, retry + 1) 31 await segmentValidator(segment, _method, _peerId, retry + 1)
32 32
33 return 33 return
34 } 34 }