]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/videos/embed.ts
Hide dock if there are no title/description
[github/Chocobozzz/PeerTube.git] / client / src / standalone / videos / embed.ts
index c79471005f7e3cda4862f561f5c7a0319ffe37c7..115d37ced952daf09eeab2403763a707fc25d4d2 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,
 
@@ -588,7 +590,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 () {
@@ -661,10 +663,12 @@ export class PeerTubeEmbed {
       ? '<span class="text">' + peertubeTranslate('Watching this video may reveal your IP address to others.') + '</span>'
       : undefined
 
-    this.player.dock({
-      title,
-      description
-    })
+    if (title || description) {
+      this.player.dock({
+        title,
+        description
+      })
+    }
   }
 
   private buildCSS () {