JS event when player has been loaded?

Hi,

I want to attach an JavaScript event to the completed load of the Podlove Web Player 5.
As its loaded dynamically, I can’t use document.addEventListener('DOMContentLoaded', ...).

Is there any possibility to add an eventListener to a completed load of the Podlove Player? Which is it?

Thanks for help.

If you call the podlovePlayer action you will get a promise returned that is resolved once the player has been initialized, e.g:

window
  .podlovePlayer("#app", "fixtures/episode.json", "fixtures/config.json")
  .then(() => {
     // done initialization
  });
1 Like