Search code examples
kepler.gl

Start "Time Playback" automatically when exporting Kepler.gl map?


I loaded my data into kepler.gl (https://kepler.gl/) and created a visual with a "Time Playback" and exported as static HTML. However, the animation is not running when the HTML is opened in a browser.

Is there a way to enable "autoplay" for the "Time Playback" (so that the user doesn't have to press the play button to start the animation?

E.g. by modifying the HTML file like it is done in https://stackoverflow.com/a/57381970/8590463 ?


Solution

  • Adding the following to the export HTML file worked for me:

    const elem = document.getElementsByClassName("playback-control-button");
    elem[1].click();