I am using barba.js for page transitions. I have video element on my corporate page that are set to autoplay, loop, and muted. Work well when I initially load the corporate page. However, when I navigate away from the corporate page and then return (without refreshing the page), the video is no longer autoplaying. The video only start autoplaying again if I manually reload the page. Note: I’m not using any frameworks (like React, Vue, etc.), just plain JavaScript (vanilla JS).
<video loop muted autoplay>
<source src="VIDEO_LINK" type="video/mp4">
</video>
I re-run all my JavaScript code on every page transition with Barba.js. What should i do for the video element ?
How I can ensure the video continue autoplaying when navigating back to the page, without requiring a page reload?
Thanks in advance!