Skip to main content
All CollectionsDevelopers
How to setup Vidjet on your Single Page Application
How to setup Vidjet on your Single Page Application

Use Vidjet on your Single Page Application

Leo Petit avatar
Written by Leo Petit
Updated over a week ago

If your site or app is a SPA (Single Page Application) this article is for you. By using SPA, your website won't reload every-time a page is accessed.

In order to let Vidjet know that the site is a SPA, you will have to make this simple Javascript call after the load of our main script. You just need to copy paste this and add it under the main script tag.

You can add this code right after loading our main script.

<script>
document.getElementById("vidjet").onload = function() {
Vidjet && Vidjet.initSpa()
}
</script>

Did this answer your question?