From now on, you can control the loading of WPVR’s video.js asset loading on your virtual tour pages.
Suppose, you’ve published virtual tours on 5 pages on your website.
And you have used the Script and Style loading control option of WPVR to load the plugin’s assets on these pages only.
This way, you’re making sure that no unnecessary scripts are loading on your site.
However, you only have virtual tours with 360 degree panorama images and no video tours.
So, you don’t need to load the video.js file on your site at all.
From WPVR’s Settings page, you can control it easily.
Here is how to control video.js loading for your each and every page with 360 video tours.
Control Video.js Loading for Virtual Tour Pages – WPVR #
1. Got to your WordPress Dashboard > WP VR > Get Started.
Click on the Settings tab.
It will take you to the advanced settings options for WPVR virtual tours.
2. Turn on the Enable video.js Control option on this page.
If you keep it enabled and click on the Save button at the bottom, the video script won’t be loaded on your entire site.
So, no 360 degree video tours (self-hosted) will work on your website.
However, you can customize it and allow it to work only on the pages with your self-hosted 360-degree video tours.
Follow the next step:
3. Go to the page where you have published a self-hosted 360 degree virtual tour.
Copy the URL of that page.
Paste the URL in the List of Allowed Pages to Load WP VR Video JS Library field.
Now, the video.js library will only load on the self-hosted video tour page.
If you have multiple pages with 360 video tours, add them one by one separating with commas.
And that’s it. This is how you can control the loading of the video library for virtual tours on your site.
If you’re interested in 360 degree videos, follow this guide to create a self-hosted 360 degree video tour with WPVR.