[SOLVED] Viewer.html/js Communicate with PubSub

I’ll use the latency callbacks to manage the receive buffer and that will keep things in sync.

The receive buffer should never be longer than the latency in seconds.

The animations play starting at the latency - 1 second because each PubSub message is 1 second long.

And that keeps the video in sync.