diff options
Diffstat (limited to 'src/media-timeline.js')
| -rw-r--r-- | src/media-timeline.js | 3 |
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, |
