From 5506155abe65bf641245333bd2c04b09f873a7c6 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Wed, 17 Jun 2026 21:29:04 -0700 Subject: [PATCH] YouTube videos: play in-app (stream via the embed overlay) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking a video thumbnail now plays it inline — the thumbnails are play buttons (data-vd-yt-play) that reuse the existing trailer overlay (youtube.com/embed/ ?autoplay=1). Applies to channel + playlist video cards and the playlist-section mini-cards (which previously just linked out to YouTube). The rest of the row still expands to details. --- webui/static/video/video-detail.js | 9 ++++++--- webui/static/video/video-side.css | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/webui/static/video/video-detail.js b/webui/static/video/video-detail.js index 7789c03b..12c0f706 100644 --- a/webui/static/video/video-detail.js +++ b/webui/static/video/video-detail.js @@ -979,7 +979,8 @@ if (ep.air_date) meta.push(fmtDate(ep.air_date)); var wished = !!ep.owned; return '
' + - '
' + still + '' + dur + '
' + + '
' + + still + '' + dur + '
' + '
' + esc(ep.title || 'Untitled') + '' + (meta.length ? '' + esc(meta.join(' · ')) + '' : '') + '
' + @@ -1743,8 +1744,8 @@ var thumb = v.thumbnail_url ? '' : ''; return '
' + - '' + thumb + '' + + '
' + + thumb + '
' + '
' + esc(v.title || 'Untitled') + '
' + ytWishBtn(v.youtube_id, v.wished, true) + '
'; } @@ -1820,6 +1821,8 @@ } // YouTube channel interactions (rendered in the show container) if (e.target.closest('[data-vd-ext]')) return; // let watch links open + var ytPlay = e.target.closest('[data-vd-yt-play]'); // play the video inline (reuses the trailer player) + if (ytPlay && r.contains(ytPlay)) { e.preventDefault(); openTrailer(ytPlay.getAttribute('data-vd-yt-play')); return; } var ytWish = e.target.closest('[data-vd-yt-wish]'); if (ytWish && r.contains(ytWish)) { e.preventDefault(); toggleYtWish(ytWish); return; } var ytPlW = e.target.closest('[data-vd-yt-pl-watch]'); diff --git a/webui/static/video/video-side.css b/webui/static/video/video-side.css index 786afbc7..fbc395fb 100644 --- a/webui/static/video/video-side.css +++ b/webui/static/video/video-side.css @@ -570,6 +570,10 @@ body[data-side="video"] .dashboard-header-sweep { padding: 1px 5px; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1.4; color: #fff; background: rgba(0, 0, 0, 0.82); letter-spacing: 0.02em; } +/* YouTube video thumbnails are play buttons (stream in-app via the embed overlay) */ +.vd-ep-thumb--play, .vd-yt-plvid-thumb { cursor: pointer; } +.vd-ep-thumb--play .vd-ep-thumb-ic { opacity: 0.92; transform: scale(1); } /* always show the play hint */ +.vd-ep-thumb--play:hover .vd-ep-thumb-ic { opacity: 1; transform: scale(1.15); } /* Channel search + sort controls (above the year pills) */ .vd-season-nav--yt { display: flex; flex-direction: column; gap: 14px; }