Description
Bug Report
Unable to access the camera while accessing the https://webcamtests.com/ URL for android and iOS ionic application
It must allow access to the Camera for record the video
It is not accessing the camera for any of the website like https://webcamtests.com/
Information
I am working on one of the Ionic project and need to access client's website which access the camera and record the video. If we run the Website on browser, it ask for permission to access the camera and if we grant the permission, it will record the video and if we denied the permission we are facing same issue what we are facing for In-App-Browser Lib.
Command or Code
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
constructor(private iab: InAppBrowser) { }
openBrowser(){
const browser = this.iab.create('https://webcamtests.com/','_blank','location=no');
}
It is opening the browser in the application however when we visit the websites which are using the camera, it shows Steam is not available error or not able to access your camera.
For only android it is working by adding following code in src/android/InAppChromeClient.java file(However don't know is it really only way to do this or not)
@Override
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void onPermissionRequest(PermissionRequest request) {
request.grant(request.getResources());
}
###Some error logs
Android(If we not modify src/android/InAppChromeClient.java)
[ERROR:web_contents_delegate.cc(175)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.
IOS
- <_UIKBCompatInputView: 0x105455200; frame = (0 0; 0 0); layer = <CALayer: 0x282eb0fc0>> returned 0 width, assuming UIViewNoIntrinsicMetric
- Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x105347880>
- Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
Environment, Platform, Device
All the android, iOS mobile devices
Version information
In-App-Browser
Cordova v9.0.0 ([email protected])
Ionic v4
Node v12.12.0
NPM v6.14.1
Development using MAC OS
Andorid Studio 3.5.2
XCode 11.3.1
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above