Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7701] IOS : camera- does not switch between front and back cameras correctly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-02-17T16:42:44.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sn/a
ComponentsiOS
Labelsqe-ios021312
ReporterSitara Shylaja
AssigneeSabil Rahim
Created2012-02-16T17:37:22.000+0000
Updated2017-03-09T22:53:28.000+0000

Description

after CAMERA_BACK is added to the switchCamera method, then CAMERA_FRONT is added to the swithCamera method,when you launch the app the back camera is activated instead of front camera steps to reproduce: 1. Launch code in app.js:
var window = Ti.UI.createWindow({
	backgroundColor:'#000'
});

// create button, register the modified click callback, add button to window
function addButton(title, clickCallback)
{
	var button = Ti.UI.createButton({title:title, width:'300', height:'50'});
	
	button.addEventListener('click', function() {
		Ti.Media.showCamera({mediaType:Ti.Media.MEDIA_TYPE_PHOTO});
		clickCallback();
		Ti.Media.vibrate();
		});
		
	window.add(button);
}

// camera with front specified after switching to back
// checks if switch function actually works, opposed to it being the default
addButton('Front Camera Test 2', function(){
	Ti.Media.switchCamera(Ti.Media.CAMERA_BACK);
	Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
});

window.open();
2. tap on front camera test2 expected result : front camera should be active Actual result : Back camera is active Note: it works as expected in 1.8.1

Comments

  1. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source