{ "id": "123038", "key": "TIMOB-15883", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2016-08-31T19:23:04.000+0000", "created": "2013-11-28T11:46:24.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Community" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "52578", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "162910", "key": "TIMOB-23847", "fields": { "summary": "VideoQuality - User is not able to set camera property to QUALITY_HIGH ", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-09-22T17:59:42.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem Description \r\nCalling Ti.Media.openPhotoGallery with the videoQuality parameter set to Ti.Media.QUALITY_HIGH, has no effect. It's ignored completely - video of medium quality is inserted. \r\n\r\nA message is also shown - \"Compressing...\" - in the picker, when in fact it should just be straight up inserting the video, not compressing it to medium quality.\r\n\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project\r\n2. Add this testcase to app.js:\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n \r\nvar view = Ti.UI.createView();\r\nwin.add(view);\r\n \r\n \r\nvar button = Ti.UI.createButton({\r\n left: 100,\r\n style: 0,\r\n title: \"Record video\", \r\n});\r\nbutton.addEventListener('click',function(){\r\n \r\n Ti.Media.showCamera({\r\n mediaTypes: Titanium.Media.MEDIA_TYPE_VIDEO,\r\n videoMaximumDuration: 10000,\r\n videoQuality: Titanium.Media.QUALITY_HIGH,\r\n saveToPhotoGallery: true,\r\n allowEditing: false,\r\n success:function(e){\r\n alert(\"video recorded and saved to path: \"+e.media.nativePath+\" size in bytes: \"+e.media.size);\r\n \r\n //apparantly the above 'saveToPhotoGallery' is not obeyed, so we manually call saveToPhotoGallery\r\n Ti.Media.saveToPhotoGallery(e.media,{\r\n success: function(evt) { \r\n alert(\"video saved to gallery at \"+evt.path);\r\n },\r\n error: function(e) {\r\n alert(\"fail to save video to gallery\");\r\n }\r\n }); \r\n \r\n \r\n },\r\n error:function(error){alert(\"error: \"+error);}\r\n }); \r\n \r\n});\r\nview.add(button);\r\n \r\nvar button = Ti.UI.createButton({\r\n right: 100,\r\n style: 0,\r\n title: \"Pick video from camera roll\", \r\n});\r\nbutton.addEventListener('click',function(){\r\n \r\n \r\n Ti.Media.openPhotoGallery({\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO], \r\n videoMaximumDuration: 10000,\r\n videoQuality: Titanium.Media.QUALITY_HIGH,\r\n allowEditing: false,\r\n success: function(e) {\r\n alert(\"video picked, path: \"+e.media.nativePath+\" size in bytes: \"+e.media.size);\r\n },\r\n error: function(error) {alert(\"error: \"+error);}\r\n }); \r\n \r\n \r\n \r\n});\r\nview.add(button);\r\n{code}\r\n3. Run it in iOS\r\n4. Check the log\r\n\r\nh4. Extra information\r\nFor detailed information and a complete code sample to test, see my Q&A here: (http://developer.appcelerator.com/question/159904/recorded-video-vs-video-from-camera-roll-on-ios---recorded-videos-are-3-times-the-file-size)\r\n\r\nNote: The documentation for http://docs.appcelerator.com/titanium/latest/#!/api/PhotoGalleryOptionsType does NOT mentioned the videoQuality parameter, but it is defined in the source code (Line 480 here: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/MediaModule.m)\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.Media.openPhotoGallery() does not obey videoQuality parameter", "creator": { "name": "kronholm", "key": "kronholm", "displayName": "Bitfabrikken - Dan Wulff Kronholm", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kronholm", "key": "kronholm", "displayName": "Bitfabrikken - Dan Wulff Kronholm", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iPad4, iOS 7.0.4, OSX 10.8.5, 3.1.3.GA", "closedSprints": [ { "id": 704, "state": "closed", "name": "2016 Sprint 18 SDK", "startDate": "2016-08-27T00:18:36.960Z", "endDate": "2016-09-10T00:18:00.000Z", "completeDate": "2016-09-09T20:26:13.865Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "394947", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This issue has just been fixed in TIMOB-23847, thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-31T19:21:11.000+0000", "updated": "2016-08-31T19:21:11.000+0000" }, { "id": "396964", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as duplicated ticket is resolved.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-22T17:59:42.000+0000", "updated": "2016-09-22T17:59:42.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }