X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fstandalone%2Fvideos%2Fembed.ts;h=115d37ced952daf09eeab2403763a707fc25d4d2;hb=b9da21bd5a3ad00f44997930391e3316182a07db;hp=af98a1561d1bce848888a993008418975d7eeb82;hpb=0cd6ffc09cd76951fea3d861a6bda7f5984cb9d2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index af98a1561..115d37ced 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -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, videojs }) + this.runHook('action:embed.player.loaded', undefined, { player: this.player, videojs, video: videoInfo }) } private async initCore () { @@ -661,10 +663,12 @@ export class PeerTubeEmbed { ? '' + peertubeTranslate('Watching this video may reveal your IP address to others.') + '' : undefined - this.player.dock({ - title, - description - }) + if (title || description) { + this.player.dock({ + title, + description + }) + } } private buildCSS () {