He estado intentando durante un tiempo hacer que mis imágenes se reproduzcan como si fuera un video para obtener más de 2 fps. Mi sistema actualiza el archivo jpeg bastante rápido, solo necesito que se cargue rápido, no puedo obtener más de 1 cuadro por segundo, lo cual es bastante lento, incluso si cambio el tiempo de espera del ciclo a menos de 1 segundo, no se cargará o lo hará. tardará más de 2 segundos en cargarse.
Mi código actual:
<?php ?> <!DOCTYPE html> <html> <body> <style> .disclaimer{ display: none; } </style> <p id="demo"></p> <img id="dumb" name="dumb" src="dumb.jpg" alt="Image" style="width:960px;height:540px;"> <script language="JavaScript"> function randomIntFromInterval(min, max) { // min and max included return Math.floor(Math.random() * (max - min + 1) + min) } window.setInterval(function() { var myImageElement = document.getElementById('dumb'); var d = new Date(); myImageElement.src = 'dumb.jpg?ver=' + d.getTime();; }, 1000); </script> </body> </html>