]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/videos/embed.ts
Live streaming implementation first step
[github/Chocobozzz/PeerTube.git] / client / src / standalone / videos / embed.ts
index fe65794f71f7d24e10f021c5c4c378819a144dcb..9b07ef5e6684d8d54802be4c96272a65f73e7d20 100644 (file)
@@ -556,9 +556,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 +588,7 @@ export class PeerTubeEmbed {
       })
     }
 
-    this.runHook('action:embed.player.loaded', undefined, { player: this.player })
+    this.runHook('action:embed.player.loaded', undefined, { player: this.player, videojs, video: videoInfo })
   }
 
   private async initCore () {
@@ -750,7 +750,11 @@ export class PeerTubeEmbed {
           isTheme: false
         }
 
-        await loadPlugin(this.peertubeHooks, pluginInfo, _ => this.buildPeerTubeHelpers(translations))
+        await loadPlugin({
+          hooks: this.peertubeHooks,
+          pluginInfo,
+          peertubeHelpersFactory: _ => this.buildPeerTubeHelpers(translations)
+        })
       }
     }
   }