Advanced Workflows

Single Page Applications

Single page applications dynamically add and remove DOM elements on a single webpage. To provide solution for the dynamic nature of the applications, the player has APIs to close the player when elements are removed, and to reload the player into new DOM elements:

player.setup();
player.close();
player.reset();
player.setupWidget();
player.loadWidget();
player.destroyWidget();

While multiple players can be setup on a single page. The Widget can be loaded only to a single player at a time. The widget is managed by a WidgetService singleton, each time one of the players calls loadWidget(), the widget is loaded in that player.

For more details please refer to the Player API.

Last updated