Moonware / cordova-cameraserver

Cordova Plugin (iOS + Android) serving Live Images from the Camera over HTTP
43 stars 34 forks source link

My application crash when i call cordova.plugins.CameraServer.startCamera on iOS #12

Open rezashnia1234 opened 7 years ago

rezashnia1234 commented 7 years ago

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

rezashnia1234 commented 7 years ago

It happened because my app does not has access to camera on iOS.