mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add tv page posters with preload
This commit is contained in:
parent
5cfcd5a7aa
commit
7b004ea590
3 changed files with 51 additions and 17 deletions
|
|
@ -172,18 +172,6 @@ class LiteYTEmbed extends HTMLElement {
|
|||
|
||||
// Computed methods
|
||||
|
||||
posterSources = () => {
|
||||
const webpSource = {
|
||||
...this.video.thumbnail,
|
||||
srcset: this.video.thumbnail.srcset.replaceAll('ytimg.com/vi/', 'ytimg.com/vi_webp/').replace(/.png|.jpg|.jpeg/g, '.webp')
|
||||
}
|
||||
|
||||
return {
|
||||
webp: webpSource,
|
||||
jpeg: this.video.thumbnail
|
||||
}
|
||||
}
|
||||
|
||||
frameId = () => {
|
||||
return `youtube-player-${this.video.id}-${this._uid}`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue