]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Remove thumbnail flash for autoplay
authorChocobozzz <me@florianbigard.com>
Mon, 2 Aug 2021 09:46:11 +0000 (11:46 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 2 Aug 2021 09:46:11 +0000 (11:46 +0200)
client/src/standalone/videos/embed.ts

index 334f386b6b53fd6078eca27c7e7635c591c81ada..c9a4e541c1d088ff26e09eed0f26d74efec362c9 100644 (file)
@@ -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,