{ "id": "171289", "key": "TIMOB-25854", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-11-25T15:26:08.000+0000", "created": "2018-03-11T18:33:18.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "audio", "engTriage", "permissions", "video", "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-25T15:26:08.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": "*Problem*\r\nWhen opening a WebRTC streaming page in an Android Webview the camera won't be visible since the permissions are not granted in the Webview itself.\r\n\r\n*How to/Example*\r\n\r\n* Go to https://palava.tv/ and click \"secret conference\"\r\n* use this url for the webview {{[PALAVA_URL]}}\r\n* App will connect to this conference room\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n title: 'Form',\r\n backgroundColor: 'blue'\r\n});\r\n\r\nvar www = Ti.UI.createWebView({\r\n url: \"[PALAVA URL]\"\r\n});\r\n\r\nwin.add(www);\r\n\r\nvar btn = Ti.UI.createButton({\r\n title:\"refresh\",\r\n bottom:10\r\n})\r\nbtn.addEventListener(\"click\",function(){\r\n www.url = \"[PALAVA_URL]\";\r\n})\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\nAdd the permissions to tiapp.xml\r\n{code:xml}\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\r\n\r\n{code}\r\n\r\n*Current status*\r\n* Not working with 7.0.2.GA and 7.1.0 (master)\r\n\r\n*Test env*\r\n* Android 7\r\n* HTC A9\r\n\r\n*Solution*\r\n* Grand permission in Webview\r\n\r\n", "attachment": [ { "id": "64954", "filename": "webrtc.mp4", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-11T18:43:23.000+0000", "size": 244306, "mimeType": "video/mp4" } ], "flagged": false, "summary": "Android: Grant WebView permissions for Audio/Video WebRTC streams", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 }, { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 }, { "id": 1045, "state": "closed", "name": "2018 Sprint 13 SDK", "startDate": "2018-06-17T20:47:13.621Z", "endDate": "2018-07-01T20:47:00.000Z", "completeDate": "2018-07-02T18:40:05.029Z", "originBoardId": 114 }, { "id": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "id": 1206, "state": "closed", "name": "2020 Sprint 19", "startDate": "2020-09-14T20:01:00.000Z", "endDate": "2020-09-25T20:01:00.000Z", "completeDate": "2020-09-28T15:30:19.875Z", "originBoardId": 114 }, { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 }, { "id": 1050, "state": "closed", "name": "2018 Sprint 14 SDK", "startDate": "2018-07-01T18:40:57.193Z", "endDate": "2018-07-15T18:40:00.000Z", "completeDate": "2018-07-16T03:27:08.720Z", "originBoardId": 114 }, { "id": 1084, "state": "closed", "name": "2018 Sprint 21", "startDate": "2018-10-07T23:32:40.560Z", "endDate": "2018-10-21T23:32:00.000Z", "completeDate": "2018-10-21T23:19:05.460Z", "originBoardId": 114 }, { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 }, { "id": 1070, "state": "closed", "name": "2018 Sprint 18 SDK", "startDate": "2018-08-26T16:14:35.297Z", "endDate": "2018-09-09T16:14:00.000Z", "completeDate": "2018-09-11T20:59:21.495Z", "originBoardId": 114 }, { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "435460", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9928\r\n\r\nwebrtc.mp4 shows a Chromium browser with my phone connected using a webview", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-11T18:35:38.000+0000", "updated": "2018-03-11T18:43:48.000+0000" }, { "id": "435461", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I was able to verify the issue in Android 8.0.0 With SDK 7.0.2.GA. Need Audio/Video permission. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-03-11T20:47:32.000+0000", "updated": "2018-03-11T20:47:32.000+0000" }, { "id": "438796", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR put on hold during more API design required. See details in the linked PR.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-06-28T06:37:44.000+0000", "updated": "2018-06-28T06:37:44.000+0000" }, { "id": "442244", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "This applies also to pages using \r\nUser gets only the file picker, no dialog to select camera or gallery and no user prompt to grant external storage and camera permissions. If those permissions are manually enabled by device's App Settings everything works ok", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-10-03T09:36:39.000+0000", "updated": "2018-10-03T09:36:39.000+0000" }, { "id": "442245", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~nipoul] if you can enable them in the app settings you could also use the normal camera/file permissions dialog (Ti.Android.requestPermissions) to enable them.", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-10-03T09:42:14.000+0000", "updated": "2018-10-03T09:42:14.000+0000" }, { "id": "442246", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "You can use request permissions and then it would be ok, but you don't want to do that before the user is about to use the camera and there is no clean way to figure out that the user clicked on . This should be handled by TiWebChromeClient", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-10-03T09:48:23.000+0000", "updated": "2018-10-03T09:48:23.000+0000" }, { "id": "442247", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thats true. But at least you can use the workaround before. For the WebRTC part there is no workaround because you can't enable that permission by hand. \r\nBut you are right, it should be taken into consideration when creating a new PR", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-10-03T09:53:57.000+0000", "updated": "2018-10-03T09:53:57.000+0000" }, { "id": "442250", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Joshua Quick Do you think I should make another ticket for camera/storage permissions or do you plan to include those as well?", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-10-03T10:58:53.000+0000", "updated": "2018-10-03T10:58:53.000+0000" }, { "id": "448320", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "I've just come up against this issue trying to do something simple with webRTC in a webView. \r\n\r\nCould this be part of a solution? \r\n\r\nhttps://developer.android.com/reference/android/webkit/WebChromeClient.html#onPermissionRequest(android.webkit.PermissionRequest)\r\n\r\n\r\n{{public void onPermissionRequest (PermissionRequest request)}}\r\n\r\nNotify the host application that web content is requesting permission to access the specified resources and the permission currently isn't granted or denied. The host application must invoke PermissionRequest#grant(String[]) or PermissionRequest#deny(). If this method isn't overridden, the permission is denied.\r\n", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2019-05-12T18:31:00.000+0000", "updated": "2019-05-12T18:31:00.000+0000" }, { "id": "448321", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "@kosso: see the PR for more details: https://github.com/appcelerator/titanium_mobile/pull/9928\r\nThere I was using {{onPermissionRequest}} which \"solves\" the problem but it will allow all permissions and doesn't ask the user. A better system with a user-permission needs to be added", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-05-12T18:41:20.000+0000", "updated": "2019-05-12T18:41:20.000+0000" }, { "id": "456901", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This can also be tested with...\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nwindow.add(Ti.UI.createWebView({\r\n\turl: 'https://mozilla.github.io/webrtc-landing/gum_test.html',\r\n}));\r\nwindow.open();\r\n{code}\r\n\r\nMozilla's webpage will test WebRTC for video-only, audio-only, and video+audio.\r\nTheir webpage also has a test for WebRTC screensharing, but there doesn't appear to be a way of supporting this via Google's Java {{WebView}}.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-16T01:32:07.000+0000", "updated": "2020-09-16T01:32:07.000+0000" }, { "id": "456949", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12105", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-19T03:58:34.000+0000", "updated": "2020-09-19T03:58:34.000+0000" }, { "id": "457215", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "FR passed for this part of the PR", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2020-10-08T13:47:26.000+0000", "updated": "2020-10-08T13:47:26.000+0000" }, { "id": "457724", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Fix verified in SDK version {{9.3.0.v20201125050632}}.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/12105", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-25T15:25:50.000+0000", "updated": "2020-11-25T15:25:50.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }