{ "id": "173959", "key": "TIMOB-27299", "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": [], "resolution": null, "resolutiondate": null, "created": "2019-07-30T17:01:52.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2019-11-11T16:10:14.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": "Hello, I am trying to run a video-chat page inside of a webview. Below is the code I have \r\nindex.xml\r\n{code}\r\n\r\n\t\r\n\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n \r\n\t\t\t \r\n\t\t\r\n\t\t\t\r\n\t\t\t \r\n\t \r\n\t \r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t\r\n\t\r\n\r\n{code}\r\nindex.js\r\n{code}\r\nblnShowingLogin=true;\r\n\r\n$.winTest.addEventListener('open',function(e){\r\n\tif (OS_ANDROID) { \r\n $.winTest.activity.actionBar.hide();\r\n }\t\t\r\n});\r\n\r\nfunction closeWindow(){\r\n\t$.winTest.close({animated:true});\r\n}\r\n\r\nTi.App.addEventListener('HandleOrientationChange', function(e) {\r\n\tRedrawWindow();\t\r\n});\r\n\r\nfunction RedrawWindow(){\r\n\r\n}\r\n\r\n\r\nif (OS_IOS) {\r\n\t$.winTest.statusBarStyle=Ti.UI.iOS.StatusBar.LIGHT_CONTENT;\r\n}\r\n\r\n\r\nif (OS_IOS) {\r\n\tif (!Ti.Media.hasCameraPermissions()) {\r\n\t\tTi.Media.requestCameraPermissions(function (e) {\r\n\t\t if (e.success) {\r\n\t\t\t\t$.wvTest.url=\"https://www.christianrock.net/chat-test.asp\";\r\n\t\t } else {\r\n\t\t Ti.API.error('Could not obtain camera permissions!');\r\n\t\t }\r\n\t\t});\r\n\t} else {\r\n\t\t$.wvTest.url=\"https://www.christianrock.net/chat-test.asp\";\r\n\t}\r\n}\r\nelse\r\n{\r\n\t$.wvTest.url=\"https://www.christianrock.net/chat-test.asp\";\r\n}\r\n\r\nRedrawWindow();\r\n$.winTest.open();\r\n{code}\r\nindex.tss\r\n{code}\r\n\".container\": {\r\n\tbackgroundColor:\"#001780\"\r\n}\r\n\r\n\"#vTop\":{\r\n backgroundColor:\"#001780\"\r\n}\r\n\r\n\"#wvLogin\":{\r\n\tbackgroundColor : \"#000000\"\r\n}\r\n\r\n\"#MainTitle\":{\r\n\tcolor: \"#ffffff\",\r\n\tfont: {\r\n\t\tfontSize: 16\r\n\t}\r\n}\r\n\r\n\"Label\": {\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n\tcolor: \"#000\"\r\n}\r\n\r\n\"#wvLoginContainer\":{\r\n top:10,\r\n borderWidth: \"1\",\r\n borderColor: \"#000000\",\r\n borderRadius: 6\r\n}\r\n\r\n\"#wvLoginContainerContainer\":{\r\n aborderWidth: \"2\",\r\n aborderColor: \"#00ff00\",\r\n backgroundImage:\"images/cover.jpg\",\r\n width:Ti.UI.FILL,\r\n\theight:Ti.UI.FILL\r\n}\r\n\r\n\"#vMain\":{\r\n aborderWidth: \"2\",\r\n aborderColor: \"#ff0000\",\r\n backgroundColor:\"#001780\",\r\n abackgroundGradient: {\r\n type: 'linear',\r\n startPoint: { x: '0%', y: '50%' },\r\n endPoint: { x: '100%', y: '50%' },\r\n colors: [ { color: '#001780', offset: 0.0}, { color: '#0d48ac', offset: 1.0 } ],\r\n }\r\n}\r\n\r\n\"#lblVersion[formFactor=tablet]\":{\r\n\tcolor: \"#ffffff\",\r\n\tfont: {\r\n\t\tfontSize: 14\r\n\t}\r\n}\r\n\"#lblVersion[formFactor=handheld]\":{\r\n\tcolor: \"#ffffff\",\r\n\tfont: {\r\n\t\tfontSize: 12\r\n\t}\r\n}\r\n\".HRView\":{\r\n height:1,\r\n\twidth:Ti.UI.SIZE,\r\n\tbackgroundColor:\"#eeeeee\"\r\n}\r\n{code}\r\nalloy.js\r\n{code}\r\n// The contents of this file will be executed before any of\r\n// your view controllers are ever executed, including the index.\r\n// You have access to all functionality on the `Alloy` namespace.\r\n//\r\n// This is a great place to do any initialization for your app\r\n// or create any global variables/functions that you'd like to\r\n// make available throughout your app. You can easily make things\r\n// accessible globally by attaching them to the `Alloy.Globals`\r\n// object. For example:\r\n//\r\n// Alloy.Globals.someGlobalFunction = function(){};\r\n\r\n\r\nAlloy.Globals.ImageCount=0;\r\nAlloy.Globals.ImageNumber=0;\r\n{code}\r\n\r\nAlso in my tiapp.xml I have the permission set for camera and microphone \r\n\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n \r\n \r\n NSCameraUsageDescription\r\n To take a picture we want to use the camera\r\n \r\n \r\n NSCameraUsageDescription\r\n For Video recording we want to use the microphone\r\n \r\n \r\n\r\n{code}\r\n\r\nNow, After the app opens, when I click on the 'click to start video chat' button inside of the webview, In Android, I get the attached error in my console:\r\n\r\n{code}\r\n[ERROR] chromium: [ERROR:web_contents_delegate.cc(196)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.\r\n[ERROR] chromium: [ERROR:web_contents_delegate.cc(196)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.\r\n[WARN] cr_media: Requires MODIFY_AUDIO_SETTINGS and RECORD_AUDIO. No audio device will be available for recording\r\n[INFO] CameraManagerGlobal: Connecting to camera service\r\n[WARN] CameraBase: An error occurred while connecting to camera 1: Service not available\r\n[ERROR] cr_VideoCapture: Camera.open:\r\n[ERROR] cr_VideoCapture: java.lang.RuntimeException: Fail to connect to camera service\r\n[ERROR] cr_VideoCapture: at android.hardware.Camera.(Camera.java:519)\r\n[ERROR] cr_VideoCapture: at android.hardware.Camera.open(Camera.java:364)\r\n[ERROR] cr_VideoCapture: at cFx.d(PG:32)\r\n[ERROR] cr_VideoCapture: at org.chromium.media.VideoCaptureFactory.getDeviceSupportedFormats(PG:20)\r\n{code}\r\n\r\nIn both iOS and Android, the attached image error in the screen shows up. I can load the URL in Safari and it works. After I click, a dialog opens for accessing camera and microphone, this dialog is not showing up in the Appcelerator app. What's the issue here? \r\n\r\nTested this issue with the above environment. The issue was reproducible. Thanks.", "attachment": [ { "id": "66790", "filename": "IMG_0353.PNG", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-07-30T19:12:38.000+0000", "size": 29515, "mimeType": "image/png" } ], "flagged": false, "summary": "Camera access from WebView, causing permission error. ", "creator": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "environment": "Appcelerator Command-Line Interface, version 7.0.12\r\nSDK version: 8.0.2.GA\r\nOperating System Name = Mac OS X\r\n Version = 10.14.5\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nDevice iPod 5G ", "comment": { "comments": [], "maxResults": 5, "total": 5, "startAt": 0 } } }