function onDeviceReady() {
cordova.plugins.CameraServer.startServer({
"www_root" : "/",
"port" : 8080,
"localhost_only" : false,
"json_info": []
}, function( url ){
// if server is up, it will return the url of http://:port/
// the ip is the active network connection
// if no wifi or no cell, "127.0.0.1" will be returned.
console.log("CameraServer Started @ " + url);
}, function( error ){
console.log("CameraServer Start failed: " + error);
});
This is my code :
function onDeviceReady() { cordova.plugins.CameraServer.startServer({ "www_root" : "/", "port" : 8080, "localhost_only" : false, "json_info": [] }, function( url ){ // if server is up, it will return the url of http://:port/
// the ip is the active network connection
// if no wifi or no cell, "127.0.0.1" will be returned.
console.log("CameraServer Started @ " + url);
}, function( error ){
console.log("CameraServer Start failed: " + error);
});
setTimeout(function(){ cordova.plugins.CameraServer.startCamera(function(){ console.log("Capture Started"); },function( error ){ console.log("CameraServer StartCapture failed: " + error); }); }, 1000); }
my app crash when cordova.plugins.CameraServer.startCamera called! what is the problem?
Thanks