From 67e184a659c6a4b3251a57e0a862e3435bfda751 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 25 Oct 2026 07:52:27 -0700 Subject: A feed clip with timed reactions seeks on the moments bar alone: the player's own controls (its seek bar) stay off, the middle play/pause shows whenever it's paused (touch too), and the sound button stays to turn it down again Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4 --- src/media-timeline.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/media-timeline.js') diff --git a/src/media-timeline.js b/src/media-timeline.js index 648c998..d8ae008 100644 --- a/src/media-timeline.js +++ b/src/media-timeline.js @@ -85,7 +85,7 @@ export function markAt(seconds, duration) { // with closures pointing at a detached player. What was said, reacted or // zapped at a moment sits on the bar at that moment; replies, reactions and // zaps made while a clip plays carry its time on their own (see momentOf). -export function mediaTimeline(player, url, { h, event, moments, glyph, label }) { +export function mediaTimeline(player, url, { h, event, moments, glyph, label, onMarks = null }) { const audio = player.tagName === 'AUDIO'; const box = h('div', { class: 'media-timeline', onClick: e => e.stopPropagation(), onPointerdown: e => e.stopPropagation() }); box._skipMorph = true; @@ -126,6 +126,7 @@ export function mediaTimeline(player, url, { h, event, moments, glyph, label }) // a video has its own seek bar: this one shows under it only to carry // what was said at a moment (two bars read as a glitch on a phone) box.classList.toggle('has-marks', items.length > 0); + if (onMarks) onMarks(items.length > 0); if (signature !== next) { signature = next; marks.replaceChildren(...items.map(x => h('button', { type: 'button', class: 'media-mark', title: mediaClock(x.moment.seconds) + ' ' + x.text, -- cgit v1.2.3