Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

fix: move duration text inside video-placeholder so that it gets replaced when playing video

Christian Fei16f6d47105fe
diff --git a/client/components/video-element.js b/client/components/video-element.js
index 9b4eeed..fd67b98 100644
--- a/client/components/video-element.js
+++ b/client/components/video-element.js
@@ -50,13 +50,13 @@ class VideoElement extends HTMLElement {
<div class="video-wrapper">
<div class="play video-placeholder" style="background-image: url(${this.video.thumbnail})">
<div class="play-icon"></div>
+ <span class="info-duration">${this.video.duration || 'N/A'}</span>
</div>
- <span class="info-duration">${this.video.duration || 'N/A'}</span>
</div>
`
: /*html*/`
<div class="video-wrapper">
- <img title="Download video" loading="lazy" src="${this.video.thumbnail}"/>
+ <img title="${this.video.title}" loading="lazy" src="${this.video.thumbnail}"/>
<span class="info-duration">${this.video.duration || 'N/A'}</span>
</div>
`}