{ "id": "162912", "key": "TIMOB-23848", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [], "resolution": null, "resolutiondate": null, "created": "2016-08-31T14:09:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "camera", "continuous", "focus", "ios", "media", "mode" ], "versions": [], "issuelinks": [ { "id": "53839", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "163426", "key": "TIMOB-23947", "fields": { "summary": "iOS: Use AVCaptureDevice for Ti.Media.showCamera", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-02-14T11:15:26.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The focus is set by default to the AUTO, there is no way to change it, in my case I need to use the continuous focus mode.\r\n\r\nandroid:\r\nFOCUS_MODE_CONTINUOUS_PICTURE & FOCUS_MODE_CONTINUOUS_VIDEO\r\n\r\niOS\r\nAVCaptureFocusMode ContinuousAutoFocus or AVCaptureFocusModeContinuousAutoFocus", "attachment": [], "flagged": false, "summary": "Ti.Media add focus methods and properties", "creator": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "subtasks": [], "reporter": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "environment": "iOS & android", "closedSprints": [ { "id": 920, "state": "closed", "name": "2017 Sprint 14 SDK", "startDate": "2017-07-02T16:29:41.455Z", "endDate": "2017-07-16T16:29:00.000Z", "completeDate": "2017-07-17T14:39:47.328Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "394940", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Thanks for creating the ticket. Our engineers will look into it. We will let you know if and when we will make avialble of this features. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-08-31T18:59:02.000+0000", "updated": "2016-08-31T18:59:02.000+0000" }, { "id": "394950", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sounds interesting. can you propose an API for this interface? It is for the {{showCamera}} arguments, right? Maybe something like:\r\n{code:javascript}\r\nTi.Media.showCamera({\r\n focusMode: Ti.Media.FOCUS_MODE_AUTO // default, other constants available\r\n});\r\n{code}\r\n\r\nEDIT: \r\n\r\niOS has\r\n{code}\r\nAVCaptureFocusModeLocked\r\nAVCaptureFocusModeAutoFocus\r\nAVCaptureFocusModeContinuousAutoFocus\r\n{code}\r\nAndroid has:\r\n{code}\r\nFOCUS_MODE_AUTO\r\nFOCUS_MODE_CONTINUOUS_PICTURE\r\nFOCUS_MODE_CONTINUOUS_VIDEO\r\nFOCUS_MODE_EDOF\r\nFOCUS_MODE_FIXED\r\nFOCUS_MODE_INFINITY\r\nFOCUS_MODE_MACRO\r\n{code}\r\n\r\nWe could use the auto-ones for the default values, the continuous ones cross-platform and the others platform-specific. Makes sense?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-31T19:28:27.000+0000", "updated": "2016-08-31T19:32:35.000+0000" }, { "id": "395069", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-09-01T10:20:33.000+0000", "updated": "2016-09-01T10:20:56.000+0000" }, { "id": "402543", "author": { "name": "tiago.duarte", "key": "tiago.duarte", "displayName": "Tiago Miguel Filipe Duarte", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "tiago.duarte", "key": "tiago.duarte", "displayName": "Tiago Miguel Filipe Duarte", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-05T12:28:58.000+0000", "updated": "2016-12-05T12:29:16.000+0000" }, { "id": "402632", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR : https://github.com/appcelerator/titanium_mobile/pull/8662\r\n\r\n[~hansknoechel] Please review above PR and let me know your feedback. Unit test cases part I will do later. \r\n\r\nImplementation example -\r\n\r\n{code:java}\r\nvar win = Titanium.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n\ttop: 20,\r\n\twidth:100,\r\n\theight: 60,\r\n\ttitle: 'OpenCamera'\r\n});\r\n\r\nbutton.addEventListener('click', function(e) {\r\n\tTitanium.Media.showCamera({\r\n\r\n\tsuccess:function(event)\r\n\t{\r\n\t\tvar cropRect = event.cropRect;\r\n\t\tif(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO)\r\n\t\t{\r\n\t\t\tvar imageView = Ti.UI.createImageView({\r\n\t\t\t\twidth:200,\r\n\t\t\t\theight:200,\r\n\t\t\t\timage:event.media\r\n\t\t\t});\r\n\t\t\twin.add(imageView);\r\n\t\t}\r\n\t},\r\n\tcancel:function()\r\n\t{\r\n\t},\r\n\terror:function(error)\r\n\t{\r\n\t},\r\n\tfocusMode:Ti.Media.FOCUS_MODE_FIXED,\r\n\tshowControls:true,\r\n\tsaveToPhotoGallery:true,\r\n\tallowEditing:true,\r\n});\r\n});\r\nwin.add(button);\r\nwin.open();\r\n{code}\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-06T04:38:42.000+0000", "updated": "2016-12-06T04:41:52.000+0000" }, { "id": "403375", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In above PR I was trying to get the AVCaptureDevice and changing the property . But after changing, it get reset to its default one. So this will not work.\r\nActually the mentioned property is available in AVFoundation framework in iOS .\r\nWe are currently using UIImagePickerController to open camera i.e available in UIKit framework.\r\nIf we want to integrate the mentioned property , we have to use AVCaptureSession. There we can use AVCaptureDevice and manage the properties .\r\n[~cng] [~hansknoechel] We have to discuss on same because it is major change.\r\n\r\nhttps://www.objc.io/issues/21-camera-and-photos/camera-capture-on-ios/", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-14T15:18:43.000+0000", "updated": "2016-12-14T15:18:43.000+0000" }, { "id": "403376", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-12-14T15:59:57.000+0000", "updated": "2016-12-14T15:59:57.000+0000" }, { "id": "403400", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Same with torch mode ( TIMOB-23856 ).\r\nI don't think it is possible to use these properties right now until the mentioned changes happen.\r\nOr is it possible with Hyperloop ?\r\n[~hansknoechel] Can you confirm please.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-15T03:01:12.000+0000", "updated": "2016-12-15T03:01:12.000+0000" }, { "id": "403597", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "That is correct. Unfortunately, iOS only exposed the focus- and torch-modes for the {{AVCaptureDevice}}, not the {{UIImagePickerController}}. TIMOB-23947 tracks progress of that improvement.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-19T08:56:34.000+0000", "updated": "2016-12-19T08:56:34.000+0000" }, { "id": "419541", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In iOS for this ticket including TIMOB-23947 and TIMOB-23856 , we are creating a camera module as mentioned in wiki https://wiki.appcelerator.org/display/pe/Custom+Camera+Support+in+iOS .", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-11T07:25:33.000+0000", "updated": "2017-05-11T07:25:33.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }