You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the examples I have read, I am doing everything correctly to add canvas capture to my HTML5 app using 'ccapture.js, but after successfully capturing a single frame (webm, jpg, etc) my animation stalls out, and my console gets repeated messages about setting and clearing a 'Timeout':
turning video capture ON
CCapture.all.min.js:1 Capturer start
CCapture.all.min.js:1 Timeout set to 1000
comet.html:11519 saving video frame
CCapture.all.min.js:1 Full Frame! 1
CCapture.all.min.js:1 Frame: 1 0
CCapture.all.min.js:1 Timeout set to 5000
CCapture.all.min.js:1 Timeout cleared
CCapture.all.min.js:1 Timeout set to 5000
CCapture.all.min.js:1 Timeout cleared
CCapture.all.min.js:1 Timeout set to 5000
CCapture.all.min.js:1 Timeout cleared
...
My animation loop never continues, and more frames are not grabbed. Stopping/saving the capture seems to work fine, but the result only contains one image/frame.
What am I doing wrong? I feel like I am so close to my goal! :)
The text was updated successfully, but these errors were encountered:
I can't help you with only that. I would need to see how your code handles frames. There can't be a handful of reasons why CCapture stalls. Usually it's because you're using timers in an unconventional/unsupported way.
My code is very long, created years ago, but I have a loop that draws on the HTML5 canvas:
function update_clock() {
user_interval = document.getElementById('user_interval').value * 1000;
var timeout_interval = setTimeout("update_clock()", user_interval);
...bunch of code that draws on canvas...
save_video_frame();
}
And a very simple function that captures a single frame:
function save_video_frame() {
console.log("saving video frame");
capturer.capture(canvas);
}
I don't have enough to work with. But relying on setTimeout/setInterval is guarantedd to become an issue if you start capturing halfway. I'd recommend using requestAnimationFrame.
From the examples I have read, I am doing everything correctly to add canvas capture to my HTML5 app using 'ccapture.js, but after successfully capturing a single frame (webm, jpg, etc) my animation stalls out, and my console gets repeated messages about setting and clearing a 'Timeout':
My animation loop never continues, and more frames are not grabbed. Stopping/saving the capture seems to work fine, but the result only contains one image/frame.
What am I doing wrong? I feel like I am so close to my goal! :)
The text was updated successfully, but these errors were encountered: