johnpolacek / BigVideo.js

The jQuery Plugin for Big Background Video (and Images)
http://johnpolacek.github.io/BigVideo.js/
2.25k stars 422 forks source link

Video doesn't load on page change #176

Closed dankozlowski closed 2 years ago

dankozlowski commented 9 years ago

In my rails app, the video works on any page that I reload, but if I hyperlink to another page in my app, the video fails to load. If I reload the page I linked to, the video re-appears. No errors occur in the console.

My code (exists in the application.html.erb, which is shared by all pages):

...
      <script>
        $(function() {
          var BV = new $.BigVideo();
          BV.init();
          BV.show("<%= video_url('rain-bg.webm') %>", { ambient:true });
        });
      </script>
  </head>
  <body>
 ...