]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-player-manager.ts
Try to optimize sha segments fetching
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-player-manager.ts
index c1953043e354721fb53f843143ed7e94a23f1389..da23c59a749dad2a2a0b33b5018b7e47592c4850 100644 (file)
@@ -98,6 +98,8 @@ export interface CommonOptions extends CustomizationOptions {
   videoViewUrl: string
   embedUrl: string
 
+  isLive: boolean
+
   language?: string
 
   videoCaptions: VideoJSCaption[]
@@ -323,7 +325,7 @@ export class PeertubePlayerManager {
     const p2pMediaLoaderConfig = {
       loader: {
         trackerAnnounce,
-        segmentValidator: segmentValidatorFactory(options.p2pMediaLoader.segmentsSha256Url),
+        segmentValidator: segmentValidatorFactory(options.p2pMediaLoader.segmentsSha256Url, options.common.isLive),
         rtcConfig: getRtcConfig(),
         requiredSegmentsPriority: 1,
         segmentUrlBuilder: segmentUrlBuilderFactory(redundancyUrlManager),