Skip to main content

Single Page Application (SPA)

Single Page Applications are generally websites created in React, Angular, Vue and other modern Javascript frameworks.

If you only want the video to be displayed in a subset of your pages, but not in ll pages, it requires additional setup.

One additional attribute named element needs to be added to the configuration object to help you in this case.

videodonut("init", "YOUR-VIDEO-ID", {
element: document.getElementById("videodonut-app"),
});

This requires that the page where the widget is mounted contains an HTML element with id="videodonut-app" such as:

<div id="videodonut-app"></div>

IMPORTANT: Make sure the DOM element where the widget will be mounted exists in the DOM tree before the widget is initialized.

Ready to Grow Your Business?Start using Video Donut today.

Add a stories-style video to your website to boost engagement and conversions.

Sign up for Free