Hello, I need your help, I am following the example of 3 screenshots and trying to include them in an HTML (also a tutorial). My problem is that I manage to include only one capture (the last of the 3). Could someone modify the code so that it includes the 3 screenshots in the HTML.
I have added two more image elements to my code, but I don’t know how to do for screenshot 1, go to element (.imgNrm_1), screenshot 2 to (.imgNrm_2) and screenshot 3 to (.imgNrm_3) .
// Thanks https://stackoverflow.com/a/44487883
var link = document.getElementById('link');
link.setAttribute('download', filename+'.png');
link.setAttribute('href', this.canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"));
//link.click();
var imgElement_1 = document.querySelector('.imgNrm_1');
imgElement_1.src = link;
var imgElement_2 = document.querySelector('.imgNrm_2');
imgElement_2.src = link;
var imgElement_3 = document.querySelector('.imgNrm_3');
imgElement_3.src = link;
What I did was pass the index of the camera to the takeScreenshot function and used the index to generate the filename of the png and also the querySelector string