Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3136] iOS: Bug MediaModule.m Front/Rear Camera

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2012-01-03T17:02:55.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sSprint 2011-44, Release 1.8.0
ComponentsiOS
Labelsmodule_media, qe-testadded
ReporterAlan Leard
AssigneeDawson Toth
Created2011-04-15T03:37:49.000+0000
Updated2012-01-25T14:12:26.000+0000

Description

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

Comments

  1. Matthew Congrove 2011-08-10

    +1 from customer.
  2. Dawson Toth 2011-11-03

    Added the pull request for this.
  3. Wilson Luu 2011-12-07

    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)
  4. Michael Pettiford 2012-01-03

    Reopening/closing to add labels

JSON Source