From 200eaf5152ca72fe6b05a49caf819e22bd045b37 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 2 Aug 2021 11:46:11 +0200 Subject: Remove thumbnail flash for autoplay --- client/src/standalone/videos/embed.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/standalone') diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 334f386b6..c9a4e541c 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -474,7 +474,9 @@ export class PeerTubeEmbed { const videoInfoPromise = videoResponse.json() .then((videoInfo: VideoDetails) => { - if (!alreadyHadPlayer) this.loadPlaceholder(videoInfo) + this.loadParams(videoInfo) + + if (!alreadyHadPlayer && !this.autoplay) this.loadPlaceholder(videoInfo) return videoInfo }) @@ -493,8 +495,6 @@ export class PeerTubeEmbed { const PeertubePlayerManager = PeertubePlayerManagerModule.PeertubePlayerManager const videoCaptions = await this.buildCaptions(serverTranslations, captionsResponse) - this.loadParams(videoInfo) - const playlistPlugin = this.currentPlaylistElement ? { elements: this.playlistElements, -- cgit v1.2.3