Skip to main content
Inspiring
July 8, 2019
Answered

Video set to loop doesn't loop when uploaded to server

  • July 8, 2019
  • 2 replies
  • 8373 views

video is an .mp4

    This topic has been closed for replies.
    Correct answer Paul-M

    Muted Autoplay is just the way it works now in Chrome (and soon, very likely, all browsers).

    There's no code to fix it, the browser itself is what's keeping it from functioning the way you'd like.


    I think we've had a similiar dicussion on these forums before . Autoplay muted is the default policy on a lot of devices as Jon says and then on some devices it may not autoplay at all, so you may need controls as a fallback so the user can manually start the video.  Something like this:

    <video playsinline autoplay loop muted controls>

         <source type="video/mp4" src="/video/test.mp4>

         <source type="video/webm" src="video/test.webm">

    </video>

    Would an extension like this be any use to you:  Video Background Magic

    2 replies

    Jon Fritz
    Community Expert
    Community Expert
    July 8, 2019

    What code do you have now (just copy and paste here, no need for an image of it) and which browser isn't autoplaying?

    Jon Fritz
    Community Expert
    Community Expert
    July 8, 2019

    There are a couple things I can see here...

    1. In the HTML5 <video> tag, attributes like controls, autoplay and loop are now boolean. Simply by existing in the video tag, they are considered "on", so you should be using simply...

    <video autoplay loop>

    2. It may also be because you're confusing the browser by using an html5 <video> tag in an XHTML 1.0 document. <video> did not exist under XHTML 1.0, back then, we were forced to use the old <object><embed> method of adding video. Mixing new tags and old doctypes can cause all kinds of issues.

    In the Page Properties go to the Title/Encoding section and change the Document Type (DTD) to HTML 5, save and re-upload.

    3. It's also possible the browser you're testing in simply won't loop. Some mobile browsers just won't do it because autoplay and loop will kill data plans.

    Inspiring
    July 8, 2019

    Ah Now we are getting somewhere!

    At first I had a video up on a .php page for about a year, looped fine. Then it stopped looping. i tried to re load the mp4 but same problem.

    Then I did a new test video and the same problem again. Then finally tried on one of my Go daddy pages and STILL same problem.

    then I checked controls and re uploaded and it now loops but I have to start manually with controls.

    Dont want to do that!

    Need the video to autoplay and loop by itself.

    Plz advize R

    Inspiring
    July 8, 2019

    php source

    <?php

    include('header.php');

    ?>

        <tr>

            <td>

          

          

        <table border="0" cellpadding="8" cellspacing="0" class="body1darkgray">

      

         <tr>

          <td><span class="reel"><a class="fvdo" href="video.php?v=VideoNew_mp4/REEL 2016SameSource.mp4"></a></span></td>

        </tr><tr>

            <td width="986" height="450

            "><img src="images/spacer.gif" alt=""  />

              <video width="1280" height="720" title="Frontpageteaser" preload="none" controls="controls" autoplay="autoplay" loop="loop" >

                <source src="VideoNew_mp4/FRONT PAGE TEASERBQ.mp4" type="video/mp4" />

              </video></td>

        </tr>

      

        </table>

          </td>

            </tr>

    <?php

    include('footer.php');

    ?>

    Php header

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

    <head>

     

    <link rel="stylesheet" type="text/css" href="css/style.css">

    <link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />

    <script type="text/javascript" src="js/jquery.min.js"></script>

    <script type="text/javascript" src="js/ddsmoothmenu.js">

    /***********************************************

    * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)

    * This notice MUST stay intact for legal use

    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code

    ***********************************************/

    </script>

    <script type="text/javascript">

    ddsmoothmenu.init({

        mainmenuid: "smoothmenu1", //menu DIV id

        orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"

        classname: 'ddsmoothmenu', //class added to menu's outer DIV

        //customtheme: ["#1c5a80", "#18374a"],

        contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]

    })

    ddsmoothmenu.init({

        mainmenuid: "smoothmenu2", //Menu DIV id

        orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"

        classname: 'ddsmoothmenu-v', //class added to menu's outer DIV

        method: 'toggle', // set to 'hover' (default) or 'toggle'

        arrowswap: true, // enable rollover effect on menu arrow images?

        //customtheme: ["#804000", "#482400"],

        contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]

    })

    </script>

    <?php include('body_header.php'); ?>

    <link rel="stylesheet" href="nivo-lightbox.css" type="text/css" />

    <link rel="stylesheet" href="themes/default/default.css" type="text/css" />

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>

    <script src="nivo-lightbox.min.js"></script>

    <script>

    $(document).ready(function(){

    $('.fvdo').nivoLightbox({

        beforeHideLightbox: function(){

            $(".nivo-lightbox-content iframe").remove();

        }

    });

    });

    </script>

      

    </head>

    <body>

        <table border="0" cellpadding="0" cellspacing="0" class="body1darkgray" align="center" width="1000px">

        <tr>

            <td><img src="images/sub_top1.jpg" width="1000" height="75" alt="" border="0"></td>

        </tr>

        <tr>

            <td><img src="images/sub_mid.jpg" width="1000" height="76" alt="" border="0"></td>

        </tr>

        <tr>

            <td id="smoothmenu1" class="ddsmoothmenu menubackground">

               <ul>

                    <li><a href="./" title="Home">Home</a></li>

                    <li><a href="bio.php" title="Bio">Bio</a></li>

                    <li><a href="clips_commercials.php" title="Commercials">Commercials</a></li>

                    <li><a href="clips_videos.php" title="Music Videos">Music Videos</a></li>

                    <li><a href="clips_shorts.php" title="Films">2nd Unit D.P.</a></li>

                 

                    <li><a href="contact.php" title="Contact">Contact</a></li>

              </ul><br style="clear: left" />

            </td>

        </tr>

        <!--  header end here -->

            <!--  content start here -->

    SAFARI AND CHROME BROWSERS