Circular callbacks in server

I have a tricky case of circular callbacks and I’m wondering if anyone has any thoughts.

Basically, I have a HTML5 video whose currentTime property I want linked to the currently selected row of a DataTable. Currently this is mediated through a dummy glyph (until Add DataModel base class · Issue #3674 · bokeh/bokeh · GitHub at least) with something like time_glyph.data_source.set(‘data’, {‘time’: video.currentTime}); I have a server-side callback for that source where I update the selection of the data table (as well as a bunch of other things). Works great!

Now, I’m trying to link things in the other direction, so the user can use the arrow keys in the data table to go back and forth in the video. My first try was with some CustomJS callback like video.currentTime = cb_obj.get(‘selected’)[‘1d’].indices[0] / 10; Of course, this leads to a circular callback problem.

Anyone have any ideas for a workaround? I’m stumped.