From b9da21bd5a3ad00f44997930391e3316182a07db Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 10 Nov 2020 16:47:25 +0100 Subject: Hide dock if there are no title/description --- client/src/standalone/videos/embed.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'client/src') diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 66033158b..115d37ced 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -558,9 +558,9 @@ export class PeerTubeEmbed { Object.assign(options, { p2pMediaLoader: { - playlistUrl: 'http://localhost:9000/live/toto/master.m3u8', + playlistUrl: hlsPlaylist.playlistUrl, segmentsSha256Url: hlsPlaylist.segmentsSha256Url, - redundancyBaseUrls: [], + redundancyBaseUrls: hlsPlaylist.redundancies.map(r => r.baseUrl), trackerAnnounce: videoInfo.trackerUrls, videoFiles: hlsPlaylist.files } as P2PMediaLoaderOptions @@ -663,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 () { -- cgit v1.2.3