[TIMOB-7701] IOS : camera- does not switch between front and back cameras correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-02-17T16:42:44.000+0000 |
Affected Version/s | Release 1.8.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-ios021312 |
Reporter | Sitara Shylaja |
Assignee | Sabil Rahim |
Created | 2012-02-16T17:37:22.000+0000 |
Updated | 2017-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
Closing ticket as invalid.