[ https://issues.apache.org/jira/browse/CB-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-1499: --------------------------------- Component/s: Plugin Camera > use of camera in cordova video mode results in field of view different than > in native video mode > ------------------------------------------------------------------------------------------------ > > Key: CB-1499 > URL: https://issues.apache.org/jira/browse/CB-1499 > Project: Apache Cordova > Issue Type: Bug > Components: iOS, Plugin Camera > Environment: iOS 5.1.1, iPhone 4 > Reporter: R Li > Priority: Minor > Labels: newbie > > The video recording function requires different camera distance from object > compared to native iOS camera > Using: > <pre><code> > // capture callback > var captureSuccess = function(mediaFiles) { > var i, path, len; > for (i = 0, len = mediaFiles.length; i < len; i += 1) { > var data = [ > {type: mediaFiles[i].type, src: mediaFiles[i].fullPath} > ]; > var map = {type:"type", src:"src"}; > app.populateWidget("HTML5Video", data, map); > app.setData("label", mediaFiles[i].type + "::" + > mediaFiles[i].fullPath); > break; > } > }; > // capture error callback > var captureError = function(error) { > navigator.notification.alert('Error code: ' + error.code, null, > 'Capture Error'); > }; > // start audio capture > navigator.device.capture.captureVideo(captureSuccess, captureError); > </code></pre> > records video fine on my iPhone 4 (iOS 5.1.1), except that the camera must be > placed closer to the subject than when using the native video function of the > iPhone. For example, when shooting a video of an object (e.g., my computer > screen) that encompasses the entire viewfinder screen of the iPhone 4 in the > native iPhone feature, the camera was placed about 10 inches away from the > object. Using the PhoneGap:build and above code resulted in having to move > the camera closer to the object (i.e., ~ 5.5-6.0 inches away) in order to > have the object encompass the entire viewfinder screen. > Is there a way to get the camera in the PG build to act exactly like the > native function so the camera is exactly the same distance from the object? > For clarification perhaps, think of the issue in the following manner: > (1) using the NATIVE video mode of the camera, measure the distance the > camera/phone is away from an object (e.g., your computer screen), as measured > when the computer screen occupies the entire width of the phone camera > screen. > (2) use the Phonegap/Cordova code video mode and measure the distance the > camera/phone is away from the same object (e.g., your computer screen) when > the computer screen occupies the entire width of the phone camera screen. > You should see a significant difference in the distance the camera/phone has > to be from the object when using the 2 different iOS camera functions (i.e., > native vs Cordova). > **NOTE: It appears that the Cordova video camera function is using the iOS > native (still picture) camera settings when trying to record a video, as > opposed to using the iOS native VIDEO camera settings. I am deducing this to > be the case since, when running the same distance test as outlined above I > can see the same effect of different distances away from the object when > testing the native iOS camera vs native iOS video toggle. That is, the native > iOS camera has to be closer to the object to fill up the entire camera screen > versus when using the native iOS video mode. > Thanks. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira