Fix poster with pending lives

pull/6266/head
Chocobozzz 2024-03-05 15:28:53 +01:00
parent fa7a022e01
commit 2a69a02527
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 7 additions and 0 deletions

View File

@ -123,6 +123,13 @@ export class PeerTubePlayer {
}
setPoster (url: string) {
// Use HTML video element to display poster
if (!this.player) {
this.options.playerElement().poster = url
return
}
// Prefer using player poster API
this.player?.poster(url)
this.options.playerElement().poster = ''
}