Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3848] iOS: iPad 2 camera overlay respect orientationModes

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2011-06-03T11:41:20.000+0000
Affected Version/sRelease 1.6.0 M10
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterJon Alter
AssigneeReggie Seagraves
Created2011-04-30T19:22:03.000+0000
Updated2017-03-09T23:10:07.000+0000

Description

Would like to be able to control the rotation of the camera overlay as you can with a window. Example below:
Titanium.UI.setBackgroundColor('#000');

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff',
	orientationModes: [ Titanium.UI.PORTRAIT ]
});

var camera_button = Titanium.UI.createButton ({
	title:'Camera',
	height:60,
	bottom: 10,
	width:160
});
camera_button.addEventListener ('click', function(e) {	
	
	Titanium.Media.showCamera ({
		orientationModes: [ Titanium.UI.PORTRAIT ],
		saveToPhotoGallery: true,
		allowEditing: true,
		
		success: function(event){
			var a = Titanium.UI.createAlertDialog({
				title: 'You did it!'
			});
			a.show();
		},
		
		error: function(error){
			var a = Titanium.UI.createAlertDialog({
				title: 'Uh Oh...'
			});
			if (error.code == Titanium.Media.NO_CAMERA || error.code == Titanium.Media.NO_VIDEO) {
				a.setMessage('Sorry, this device does not have a camera. You knew that, right?');
			}
			else {
				a.setMessage('Unexpected error: ' + error.code);
			}
			a.show();
		}
				
	});

});

win1.add(camera_button);
win1.open();

Associated Helpdesk Ticket

http://appc.me/c/APP-939465

Comments

  1. Lee Morris 2017-03-09

    Closing ticket as the issue will not fix.

JSON Source