mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-03-17 06:21:03 +08:00
parent
57b177f3fb
commit
af98d57417
@ -69,7 +69,7 @@ function capture(success, errorCallback) {
|
|||||||
canvas.getContext('2d').drawImage(video, 0, 0, 320, 240);
|
canvas.getContext('2d').drawImage(video, 0, 0, 320, 240);
|
||||||
|
|
||||||
// convert image stored in canvas to base64 encoded image
|
// convert image stored in canvas to base64 encoded image
|
||||||
var imageData = canvas.toDataURL('img/png');
|
var imageData = canvas.toDataURL('image/png');
|
||||||
imageData = imageData.replace('data:image/png;base64,', '');
|
imageData = imageData.replace('data:image/png;base64,', '');
|
||||||
|
|
||||||
// stop video stream, remove video and button.
|
// stop video stream, remove video and button.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user