I'm trying to grap some images of a video that is not played. Therefore I use the HTML5 .
Because I want to grab images that haven't been played, I set
video.currentTime = y;
If I now call the grap function it won't work.
Because the video.readyState
is 1 (and not 4).
If I add at the beginning of the grab function an alert();
it works.
I tried to loop until readyState == 4
with
while(true){
if(video.readyState == 4){
grapImage();
}
}
but this ends up in an endless loop.
So how can I wait until readyState == 4
?
Thanks
video.currentTime = y;
with the method mentioned there as the second entry. Does load() destroyes the video element? Or why am I getting this Error? – Uni