mirror of
https://gitee.com/shuto/cordova-plugin-camera.git
synced 2025-05-01 00:20:10 +08:00
Revert "CB-8683 updated blackberry specific references of org.apache.cordova.camera to cordova-plugin-camera"
This reverts commit ee4ac0d7b28fc638ad2a5abc2158dbc2997bf744.
This commit is contained in:
parent
52a9d39855
commit
03a720808b
@ -60,7 +60,7 @@ function showCameraDialog (done, cancel, fail) {
|
|||||||
});
|
});
|
||||||
wv.on('JavaScriptCallback', function (evt, data) {
|
wv.on('JavaScriptCallback', function (evt, data) {
|
||||||
var args = JSON.parse(data).args;
|
var args = JSON.parse(data).args;
|
||||||
if (args[0] === 'cordova-plugin-camera') {
|
if (args[0] === 'org.apache.cordova.camera') {
|
||||||
if (args[1] === 'cancel') {
|
if (args[1] === 'cancel') {
|
||||||
cancel('User canceled');
|
cancel('User canceled');
|
||||||
} else if (args[1] === 'error') {
|
} else if (args[1] === 'error') {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
document.getElementById('back').onclick = function () {
|
document.getElementById('back').onclick = function () {
|
||||||
window.qnx.callExtensionMethod('cordova-plugin-camera', 'cancel');
|
window.qnx.callExtensionMethod('org.apache.cordova.camera', 'cancel');
|
||||||
};
|
};
|
||||||
window.navigator.webkitGetUserMedia(
|
window.navigator.webkitGetUserMedia(
|
||||||
{ video: true },
|
{ video: true },
|
||||||
@ -36,11 +36,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
canvas.width = video.videoWidth;
|
canvas.width = video.videoWidth;
|
||||||
canvas.height = video.videoHeight;
|
canvas.height = video.videoHeight;
|
||||||
canvas.getContext('2d').drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
canvas.getContext('2d').drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
||||||
window.qnx.callExtensionMethod('cordova-plugin-camera', canvas.toDataURL('img/png'));
|
window.qnx.callExtensionMethod('org.apache.cordova.camera', canvas.toDataURL('img/png'));
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
function () {
|
function () {
|
||||||
window.qnx.callExtensionMethod('cordova-plugin-camera', 'error', 'getUserMedia failed');
|
window.qnx.callExtensionMethod('org.apache.cordova.camera', 'error', 'getUserMedia failed');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user