Problem
Two problems in MediaModule.m:
- camera_front and camera_rear are reversed. The front camera is the back, and the back camera is the front
- vibrate's call to ensure_ui_thread specifies the callback method as the beep method; it happens that these two methods are identical, so it doesn't really matter... but...
Solution
Fix the code.
How To Test
Drop the following in an app.js and run it on a device with a front camera (like an iPad 2). It should use the front camera.
Ti.Media.showCamera({
mediaTypes: Ti.Media.MEDIA_TYPE_PHOTO
});
Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
Ti.Media.vibrate();
Reference Ticket
http://developer.appcelerator.com/helpdesk/view/72631
Pull Request
https://github.com/appcelerator/titanium_mobile/pull/627
+1 from customer.
Added the pull request for this.
Closing bug. Verified fix on: OS: Mac OS X Lion Titanium Studio, build: 1.0.7.201112061404 SDK build: 1.8.0.1.v20111207112258 Device: iphone 4S Sprint (5.0.1)
Reopening/closing to add labels