Plotly link animation update to independent HTML video

Hi all,

I am hoping to connect/trigger plotly animations to start/stop when an HTML button is clicked (same button will play/pause an independent video). Currently, I have the sample animation working in Plotly Python/I think I need to convert to plotly.js for it to be feasible, but my question is:

  • for updatemenu buttons, what event is emitted/triggered when they are clicked? Right now I have a simple play/pause–is it possible to tell when these updatemenu buttons are clicked?

Additionally, am I able to to fast forward the animation programmatically (based on an external slider)? Or if I integrate a slider to the update menu, what event is triggered there? I briefly tried Dash, but seems to run into the same issue.


Hello @prehani,

It sounds like maybe you could link the animation with a slider that could get updated at n_intervals in Dash. Then perform a callback the steps it however many frames.

For the updatemenu, in Dash this is possible by having multiple inputs to 1 output.

Plotly and Dash use React components, and are a little tricky to get the hang of when moving from straight javascript. Plotly.js has its on set of event listeners and such.