Skip to content

Commit

Permalink
Update sv-panoid.html
Browse files Browse the repository at this point in the history
  • Loading branch information
freealise authored Apr 19, 2024
1 parent 34351eb commit 3d26b67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/basic/sv-panoid.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ <h2>GoogleStreetViewLoader.load</h2>
DownloadVideo.addEventListener("click", function (e) {
e.preventDefault();
const canvases = document.getElementsByTagName('canvas');
setTimeout(mediaRecorder.stop(), (canvases.length + 1) * 1000);

intv = setInterval(function() {
const ctx = canvases[k].getContext("2d");
Expand All @@ -221,7 +222,7 @@ <h2>GoogleStreetViewLoader.load</h2>
canvases[0].height = canvases[k].height;
context.putImageData(imgData, 0, 0);
k++;
if (k == canvases.length) { clearInterval(intv); k=1; setTimeout(mediaRecorder.stop(), 1000); }
if (k == canvases.length) { clearInterval(intv); k=1; }
}, 1000);

mediaRecorder.start(0);
Expand Down

0 comments on commit 3d26b67

Please sign in to comment.