{ "id": "65743", "key": "TIMOB-4207", "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": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-08T11:42:52.000+0000", "created": "2011-05-24T16:51:35.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-06-28T12:49:21.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h1. Problem\r\nUsing Ti.Media.createVideoPlayer adds the camera permissions to the resulting AndroidManifest.xml.\r\n\r\nh2. Solution\r\nEdit builder.py to remove this relationship (I'll send a pull request on Ti Mobile with this change).\r\n\r\nh2. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-744612", "attachment": [], "flagged": false, "summary": "Media.createVideoPlayer requires CAMERA_PERMISSION", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "134200", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "h2. Pull Request\nhttps://github.com/appcelerator/titanium_mobile/pull/100", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-05-24T16:56:30.000+0000", "updated": "2011-05-24T16:56:30.000+0000" }, { "id": "155748", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "h2. Sample Code\r\nDrop the following in an app.js to test this change. It downloads a 7mb video and plays it in a video player.\r\n{code:title=app.js}\r\nvar videoLink = 'http://photosbydawson.com/resources/yoyo.mp4';\r\nvar videoFile = Ti.Filesystem.getFile('file:///sdcard/').exists()\r\n ? Ti.Filesystem.getFile('file:///sdcard/yoyo.mp4')\r\n : Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'yoyo.mp4');\r\n\r\nvar win = Ti.UI.createWindow({ backgroundColor: '#000' });\r\nwin.open();\r\n\r\nfunction downloadVideo() {\r\n var progressBar = Ti.UI.createProgressBar({\r\n max: 1, min: 0, value: 0,\r\n visible: true\r\n });\r\n win.add(progressBar);\r\n var xmlHttpObj = Ti.Network.createHTTPClient({\r\n ondatastream: function(e) {\r\n progressBar.value = e.progress;\r\n },\r\n onreadystatechange: function() {\r\n if (xmlHttpObj.readyState == 4) {\r\n videoFile.write(xmlHttpObj.responseData);\r\n win.remove(progressBar);\r\n playVideo();\r\n }\r\n }\r\n });\r\n xmlHttpObj.open('GET', videoLink);\r\n xmlHttpObj.send();\r\n}\r\n\r\nfunction playVideo() {\r\n var videoPlayer = Ti.Media.createVideoPlayer({\r\n url: videoFile.nativePath\r\n });\r\n if (parseFloat(Ti.Platform.version) >= 3.2) {\r\n win.add(videoPlayer);\r\n }\r\n videoPlayer.play();\r\n}\r\n\r\nif (videoFile.exists()) {\r\n playVideo();\r\n}\r\nelse {\r\n downloadVideo();\r\n}\r\n{code}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-06-08T11:38:41.000+0000", "updated": "2011-06-08T11:38:41.000+0000" }, { "id": "157949", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "closing against 1.8.0.v20110628104237. confirmed on galaxy pad (2.2.1), xoom (3.1) opening a new issue for the droid 1 as per Don.", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-28T12:49:21.000+0000", "updated": "2011-06-28T12:49:21.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }