Devo visualizzare un paio di video in tempo reale, provenienti da un mio sito esterno.
Il seguente script funziona perfettamente con Chrome, Opera e Edge, ma non con Firefox.
Codice HTML
codice:
<TR>
<td align=center width=645>
<div id="webcam-container1">
<img id="webcam-image1" src="">
</div>
</td>
<td align=center> </td>
<td align=center width=645 valign=top>
<div id="webcam-container2">
<img id="webcam-image2" src="">
</div>
</td>
</TR>
Codice Javascript
codice:
<script>
function updateWebcamImage() {
var image1 = document.getElementById('webcam-image1');
image1.src = 'http://alp.duckdns.org:1234';
var image2 = document.getElementById('webcam-image2');
image2.src = 'http://alp.duckdns.org:1235';
}
setInterval(updateWebcamImage, 1000);
</script>
Preciso che sono costretto ad usare il protocollo http.
Come rendere compatibile il codice con tutti o quasi i browser ?
Grazie per l'attenzione