]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/videos/embed.ts
Try to optimize sha segments fetching
[github/Chocobozzz/PeerTube.git] / client / src / standalone / videos / embed.ts
index af98a1561d1bce848888a993008418975d7eeb82..66033158b6f63b8c7f6462550e240eff7dd6086f 100644 (file)
@@ -532,6 +532,8 @@ export class PeerTubeEmbed {
         inactivityTimeout: 2500,
         videoViewUrl: this.getVideoUrl(videoInfo.uuid) + '/views',
 
+        isLive: videoInfo.isLive,
+
         playerElement: this.playerElement,
         onPlayerElementChange: (element: HTMLVideoElement) => this.playerElement = element,
 
@@ -556,9 +558,9 @@ export class PeerTubeEmbed {
 
       Object.assign(options, {
         p2pMediaLoader: {
-          playlistUrl: hlsPlaylist.playlistUrl,
+          playlistUrl: 'http://localhost:9000/live/toto/master.m3u8',
           segmentsSha256Url: hlsPlaylist.segmentsSha256Url,
-          redundancyBaseUrls: hlsPlaylist.redundancies.map(r => r.baseUrl),
+          redundancyBaseUrls: [],
           trackerAnnounce: videoInfo.trackerUrls,
           videoFiles: hlsPlaylist.files
         } as P2PMediaLoaderOptions
@@ -588,7 +590,7 @@ export class PeerTubeEmbed {
       })
     }
 
-    this.runHook('action:embed.player.loaded', undefined, { player: this.player, videojs })
+    this.runHook('action:embed.player.loaded', undefined, { player: this.player, videojs, video: videoInfo })
   }
 
   private async initCore () {