aboutsummaryrefslogtreecommitdiffstats
path: root/src/media-timeline.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-25 07:52:27 -0700
committerAdam Soltys <[email protected]>2026-10-25 07:52:27 -0700
commit67e184a659c6a4b3251a57e0a862e3435bfda751 (patch)
tree3aed0bd0bdb05e5568183bfe6e917f4f2d493dcb /src/media-timeline.js
parent4c3ec3ea6b8d909466044071bee3b852c6bf0845 (diff)
downloadcoinosv3-67e184a659c6a4b3251a57e0a862e3435bfda751.tar.gz
coinosv3-67e184a659c6a4b3251a57e0a862e3435bfda751.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
Diffstat (limited to 'src/media-timeline.js')
-rw-r--r--src/media-timeline.js3
1 files changed, 2 insertions, 1 deletions
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,