Remove thumbnail flash for autoplay

This commit is contained in:
Chocobozzz 2021-08-02 11:46:11 +02:00
parent 4a7056b283
commit 200eaf5152
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 3 deletions

View 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,