My HTML5 Video keeps playing when I switch pages
<p>I am using React and Rails to build a small website with a few different page routes. On the landing page I have included an HTML 5 video, which is muted and autoplays. On this page it works great. However, when I change pages the HTML 5 video continues to play, and is no longer muted (ie. I can hear it playing, but cannot see it). I cannot see the component which contains the video in the DOM.</p>

<p>I think I might need to destroy this component when changing pages, but not exactly sure about the right approach here. Thoughts? Thanks in advance!</p>