MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / capture

Function capture

modules/certificate/certificate.js:84–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 }
83
84 function capture() {
85 ctx.drawImage(certificate, 0, 0);
86
87 ctx.drawImage(video,
88 x, y, minD, minD,
89 offsetX, offsetY, width, height);
90
91 output.src = canvas.toDataURL();
92
93 vidStream.getTracks()[0].stop();
94 // video.parentElement.removeChild(video);
95
96 download.href = canvas.toDataURL('image/png');
97 download.click();
98
99 }
100
101 d3.select('#photo').on('click', init)
102

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected