{ "id": "162113", "key": "TIMOB-23686", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-03T08:22:58.000+0000", "created": "2016-07-26T18:09:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "52324", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "162353", "key": "TIMOB-23716", "fields": { "summary": "Windows: Front camera preview/image is upside down", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-08-29T13:13:45.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "Currently, it is not possible to specify which camera (front or rear) to use.\r\n\r\nUse {{DeviceInformation::FindAllAsync(DeviceClass::VideoCapture)}} to find the {{Id}} of the specified camera and set the {{VideoDeviceId}} of {{MediaCaptureInitializationSettings}}\r\n\r\n*Test Case*\r\n\r\nSetting {{whichCamera: Titanium.Media.CAMERA_FRONT}} should show front camera preview.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'green', layout: 'vertical' }),\r\n openButton = Ti.UI.createButton({ title: 'OPEN CAMERA', backgroundColor: 'blue' }),\r\n imageView = Ti.UI.createImageView({ width: Ti.UI.FILL, height: '70%' });\r\n\r\nvar overlay = Ti.UI.createView({\r\n layout: 'vertical',\r\n height: '20%', width: Ti.UI.FILL,\r\n bottom: 0\r\n}),\r\ntakeButton = Ti.UI.createButton({ title: 'TAKE A PHOTO', backgroundColor: 'red' }),\r\nhideButton = Ti.UI.createButton({ title: 'HIDE PREVIEW', backgroundColor: 'red' });\r\n\r\ntakeButton.addEventListener('click', function () {\r\n Ti.Media.takePicture();\r\n});\r\nhideButton.addEventListener('click', function () {\r\n Ti.Media.hideCamera();\r\n});\r\noverlay.add(takeButton);\r\noverlay.add(hideButton);\r\n\r\nopenButton.addEventListener('click', function () {\r\n Ti.Media.showCamera({\r\n whichCamera: Titanium.Media.CAMERA_FRONT, // Titanium.Media.CAMERA_REAR\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n overlay: overlay,\r\n success: function (e) {\r\n Ti.API.info('showCamera() success');\r\n imageView.image = e.media;\r\n },\r\n error: function (e) {\r\n alert('showCamera() error: ' + JSON.stringify(e));\r\n }\r\n });\r\n});\r\n\r\nwin.add(openButton);\r\nwin.add(imageView);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Windows: Implement CameraOptionsType.whichCamera", "creator": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 685, "state": "closed", "name": "2016 Sprint 16 SDK", "startDate": "2016-07-30T00:40:02.939Z", "endDate": "2016-08-13T00:40:00.000Z", "completeDate": "2016-08-15T08:00:33.056Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "392199", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/797", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-08-02T14:42:47.000+0000", "updated": "2016-08-02T14:42:47.000+0000" }, { "id": "394633", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nWindows 10 Pro \r\nAppc core: 6.0.0-31 \r\nAppc NPM: 4.2.8-5 \r\nTi SDK: 6.0.0.v20160829005859\r\nLumia 520 8.1\r\nLumia 930 10.0\r\n\r\nUsing the example code above the camera preview can be set to either the front or back, setting an invalid option or no option will set it to the default for the device\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-08-29T13:13:41.000+0000", "updated": "2016-08-29T13:13:41.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }