Hi guys I'm a little bit confused about a video element. My project consist in a main video page. I should be able to play and pause the video to show some extra informations, but when I change route and I come back to the main page, the one with the video, the video gets "duplicated". You can notice it from the overlayed audio: one from the from the cue point when I paused before changing page, and the other is from the video begin. It's like the first element is cached by the browser.
How I can reinit video element when I come back to main page? Or, how can I avoid this "cached video behaviour"?
Video element markup:
<video class="video" playsinline preload="auto" src="~/assets/url/to/video"></video>
Video is stored in a variable in mounted hook like this:
var mainVideo = document.querySelectorAll('.video')[0]
I've tried some tricky solutions but i can't get away with it. Any ideas?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2077">#c2077</a>)</em></sub></div>