<script type="text/javascript"> var ile=1189; var myVideo = document.getElementById("pv_video"); function stoper() { if ((ile % 20)==0 ) myVideo.play() ile--; } function playVid() { myVideo.play(); } var intervalHandler=setInterval(stoper,1000); </script>
Witam mam problem z tym że funkcja stoper nie uruchamia w ogóle filmu a ma uruchamiać co 20 sekund. Jednakże po uruchomieniu przez "button" i przypisaną mu funkcję playVid film jest odtwarzany a funkcja stoper zaczyna wtedy działać. Skąd taki problem?