{ "id": "162884", "key": "TIMOB-23856", "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-30T16:32:45.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "camera", "flash", "ios", "torch" ], "versions": [], "issuelinks": [ { "id": "53840", "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": null, "updated": "2018-02-28T19:55:33.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": [], "description": "There are 3 flash modes available: (off, on & auto) it will be a good thing to have the torch mode also.\r\n\r\niOS have 2 separated class for managing this properties:\r\n\r\n[AVCaptureFlashMode|https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureDevice_Class/#//apple_ref/c/tdef/AVCaptureFlashMode]\r\n\r\n[AVCaptureTorchMode|https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureDevice_Class/#//apple_ref/swift/enum/c:@E@AVCaptureTorchMode]\r\n\r\nIt would be nice to add the *CAMERA_FLASH_TORCH* constant.\r\n\r\n[android.Camera.Parameters.FLASH_MODE_TORCH|https://developer.android.com/reference/android/hardware/Camera.Parameters.html#FLASH_MODE_TORCH]\r\n\r\n* Added in API level 5\r\n* String FLASH_MODE_TORCH\r\n* Constant emission of light during preview, auto-focus and snapshot. This can also be used for video recording.\r\n* Constant Value: \"torch\"\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS/Android: Add support for the cameraTorchMode", "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", "comment": { "comments": [ { "id": "394943", "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-31T19:08:00.000+0000", "updated": "2016-08-31T19:08:00.000+0000" }, { "id": "395073", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I would like to put this into an own API to keep it clean between both.\r\n\r\n*Proposed API*:\r\n- Ti.Media.cameraTorchMode (get and set)\r\n- Ti.Media.CAMERA_TORCH_OFF\r\n- Ti.Media.CAMERA_TORCH_ON\r\n- Ti.Media.CAMERA_TORCH_AUTO\r\n\r\nAll very similar to the {{cameraFlashMode}}. [~ricardo_jcp], cool?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-01T10:33:33.000+0000", "updated": "2016-09-01T10:34:34.000+0000" }, { "id": "395074", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "I was trying to edit the post and I've lost what I've written, so, here it goes:\r\n\r\n2 possible solutions:\r\n\r\nTi.Media.cameraTorchMode (set and get) [bool] //this only will work if the flash mode is set to ON\r\nTi.Media.cameraFlashMode (set and get) [CAMERA_FLASH_AUTO, CAMERA_FLASH_OFF, CAMERA_FLASH_ON]\r\n\r\nor (the one I think it's the best and cleanest way):\r\n\r\nTi.Media.cameraFlashMode (set and get) [CAMERA_FLASH_AUTO, CAMERA_FLASH_OFF, CAMERA_FLASH_ON, CAMERA_FLASH_TORCH]", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-09-01T10:39:11.000+0000", "updated": "2016-09-01T10:39:11.000+0000" }, { "id": "395079", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "body": "One more thing, this will be nice to have also in android, and for what I've seen, its simpler to add it to android, since it's a default flash property: [Camera.Parameters - FLASH_MODE_TORCH|https://developer.android.com/reference/android/hardware/Camera.Parameters.html#FLASH_MODE_TORCH]", "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-09-01T10:53:51.000+0000", "updated": "2016-09-01T10:53:51.000+0000" }, { "id": "402544", "author": { "name": "tiago.duarte", "key": "tiago.duarte", "displayName": "Tiago Miguel Filipe Duarte", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This ticket it's not only for iOS, but also for android\r\n\r\n*FLASH_MODE_TORCH*\r\n\r\nAdded in API level 5\r\nString FLASH_MODE_TORCH\r\nConstant emission of light during preview, auto-focus and snapshot. This can also be used for video recording.\r\n\r\nConstant Value: \"torch\"", "updateAuthor": { "name": "tiago.duarte", "key": "tiago.duarte", "displayName": "Tiago Miguel Filipe Duarte", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-05T12:30:44.000+0000", "updated": "2016-12-05T12:31:15.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }