• I’d like to use a video (such as an .mp4) instead of static images in the Home Page Slider. Is there any way I could implement this using .PHP or a plugin?

    For reference, this is what I have right now: here
    And this is what I’d like to have: here

    That second link was a pure .PHP version of the site (without WordPress), where we had the following code. Is there somewhere in the theme content that I could simply copy this chunk to? Thank you!

    <video src="banner_videos/video1.mp4" autoplay id="backgroundVideo" poster="banner_videos/banner.jpg"></video>
        <script type='text/javascript'>
          var i = 0;
          var videoList = ["banner_videos/video1.mp4", "banner_videos/video2.mp4"]; //,"banner_videos/video2.mp4"];
          var numVideos = videoList.length;
    
          document.getElementById('backgroundVideo').addEventListener('ended', myHandler, false);
    
          function myHandler(e) {
            if (!e) {
              e = window.event;
            }
            i++;
            if (i == numVideos) {
              i = 0;
            }
            $('#backgroundVideo').attr("src", videoList[i]);
          }
        </script>
  • The topic ‘Add video to Home Page Slider’ is closed to new replies.