refac
This commit is contained in:
1 parent
a1155dfeb7
commit
96ec66a89c
1 file changed
+3
-2
@@ -334,8 +334,9 @@
|
|||||||
|
|
||||||
// Convert the canvas to a Base64 image URL
|
// Convert the canvas to a Base64 image URL
|
||||||
const imageUrl = canvas.toDataURL('image/png');
|
const imageUrl = canvas.toDataURL('image/png');
|
||||||
// Add the captured image to the files array to render it
|
const blob = await (await fetch(imageUrl)).blob();
|
||||||
files = [...files, { type: 'image', url: imageUrl }];
|
const file = new File([blob], `screen-capture-${Date.now()}.png`, { type: 'image/png' });
|
||||||
|
inputFilesHandler([file]);
|
||||||
// Clean memory: Clear video srcObject
|
// Clean memory: Clear video srcObject
|
||||||
video.srcObject = null;
|
video.srcObject = null;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in new issue
Block a user