Sync embedded iframe visualizations to a parent timeline with postMessage
To keep third-party or backend-served viewer iframes exactly in step with a page's playhead, have each viewer post a ready message to its parent once loaded. The parent answers with the data once (e.g. the audio clip as a Float32Array, which structured-clones cheaply), then posts only the time on each tick. The viewer stores the latest time and repaints once per animation frame from it, so a slow repaint never queues behind ticks. Turn the viewer's own animation loop off in this mode. Use one fixed display scale per clip, since a running peak makes the same instant look different depending on history. Test it by requiring that the same t repaints identical pixels and that the viewer's reported t string matches the page's exactly. Embedded viewers often hide their caption, so assert its text rather than its visibility.