From 2a572b0902ccc317e60f59bc0cef6007fd5afa53 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 24 Oct 2024 16:15:12 +0200 Subject: [PATCH] fix: Doc config typo --- packages/p2p-media-loader-core/src/p2p/peer.ts | 3 ++- packages/p2p-media-loader-core/src/types.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/p2p-media-loader-core/src/p2p/peer.ts b/packages/p2p-media-loader-core/src/p2p/peer.ts index d423d113..7b6763b9 100644 --- a/packages/p2p-media-loader-core/src/p2p/peer.ts +++ b/packages/p2p-media-loader-core/src/p2p/peer.ts @@ -141,6 +141,7 @@ export class Peer { const { request, controls } = downloadingContext; const isWrongSegment = + !request.data || downloadingContext.request.segment.externalId !== command.i || downloadingContext.requestId !== command.r; @@ -164,7 +165,7 @@ export class Peer { (await this.peerConfig.validateP2PSegment?.( request.segment.url, request.segment.byteRange, - request.data! + request.data )) ?? true; if (this.downloadingContext !== downloadingContext) return; diff --git a/packages/p2p-media-loader-core/src/types.ts b/packages/p2p-media-loader-core/src/types.ts index 0ff6554b..ed9dc089 100644 --- a/packages/p2p-media-loader-core/src/types.ts +++ b/packages/p2p-media-loader-core/src/types.ts @@ -155,7 +155,6 @@ export type CommonCoreConfig = { * httpDownloadTimeWindow: 3000, * p2pDownloadTimeWindow: 6000, * swarmId: "custom swarm ID for video stream", - * cashedSegmentsCount: 1000, * } * ``` *