{ "id": "162114", "key": "TIMOB-23687", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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:21:04.000+0000", "created": "2016-07-26T18:14:34.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "52323", "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-10-07T14:45:58.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": "On my Lumia 1020, the front facing camera is the default camera. However, I would expect the rear facing camera to be the default.\r\n\r\nInvestigating shows that neither the front or rear cameras of my device have the {{device->IsDefault}} flag set to {{true}}. In this case, we should determine the correct camera to use and default to that.\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: Camera can default to front facing camera on some devices", "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": "392198", "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:24.000+0000", "updated": "2016-08-02T14:42:24.000+0000" }, { "id": "398351", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nOS: Microsoft Windows 10 Pro 10.0.14393\r\nAppc core: 6.0.0-57\r\nAppc NPM: 4.2.8-7\r\nTi SDK: 6.0.0.v20161006171259\r\nAppc Studio: 4.8.0.201610060953\r\n\r\nCamera defaults to rear facing camera\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-10-07T14:45:55.000+0000", "updated": "2016-10-07T14:45:55.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }