• I am testing the plugin and i have wp version 5.0.3 and i just installed this plugin fresh. It works on initial page load, but after that it does not auto refresh. I was reading other topics on here, and is this plugin still broken due to old react versions? Or has someone gotten it fixed? Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter 121940kz

    (@121940kz)

    I ended up writing my own solution which does not require any plugins. It uses jQuery which is included in wordpress by default so it should not ever break. Below is my implementation, and i have it in a page, but you can place this code anywhere in a widget code editor etc.

    The nice thing about this implementation is that you can have as many as you need, and you can have the source location be anywhere. (someone else’s website, amazon S3, google drive etc). My implementation has 2.

    Hopefully someone finds this useful

    <img src="" alt="Camera Refreshes Every 30 Seconds" />
    <img src="" alt="Camera Refreshes Every 30 Seconds" />
    <script>
    jQuery(document).ready(function() {
        image_url1 = "https://www.your-url-here.com/wp-content/uploads/webcam/webcam1.jpg?";
        x = new Date();
        jQuery("#Cam1").attr("src", image_url1 + x.getTime());
        window.setInterval(function(){
          d = new Date();
          jQuery("#Cam1").attr("src", image_url1 + d.getTime());
        }, 30000);
        image_url2 = "https://www.your-url-here.com/wp-content/uploads/webcam/webcam2.jpg?";
        y = new Date();
        jQuery("#Cam2").attr("src", image_url2 + y.getTime());
        window.setInterval(function(){
          e = new Date();
          jQuery("#Cam2").attr("src", image_url2 + e.getTime());
        }, 30000);
    });
    </script>
    • This reply was modified 5 years, 9 months ago by 121940kz.
Viewing 1 replies (of 1 total)
  • The topic ‘So is autorefreshing broken still?’ is closed to new replies.