You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/06/24 13:54:03 UTC

[GitHub] [cordova-plugin-inappbrowser] yaminikonduru opened a new issue #741: Unable to access Camera and Microphone functionalities in InAppBrowser

yaminikonduru opened a new issue #741:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/741


   # Bug Report
   # Unable to access Camera and Microphone, even if application has permission to access both functionalities.
   
   ## Problem
   ## Not able to access camera and microphone(throws error permissions denied) while trying to access url [https://webrtc.github.io/samples/src/content/devices/input-output/](https://webrtc.github.io/samples/src/content/devices/input-output/)
   
   ## Information
   ### Happening 
    Working on cordova Android Application(using Angularjs), In application user need access of camera and microphone to click photo/ record video/record response, i have added cordova plugins(cordova-plugin-inappbrowser-camera,cordova-plugin-media-capture) for accessing camera and recording video and enabled permissions too, but while checking permissions using `navigator.mediaDevices.getUserMedia()` it throws permission denied. It is expected to access camera and microphone, after granting the permissions in the application,else it has to prompt a dialog box for requesting permissions.
   
   ### Expected
   when we open same link in browser, browser prompts for requesting the permission to access camera and microphone, user can grant permission or user can deny, requesting dialog box also doesn't appear in inAppBrowser.
   
   ### Command or Code
   
   Added plugins using 
   ```
   cordova plugin add cordova-plugin-inappbrowser
   cordova plugin add cordova-plugin-camera
   cordova plugin add cordova-plugin-media-capture
   ```
   
   Invoking inAppBrowser using this code:
   
   ```
       var url ="https://webrtc.github.io/samples/src/content/devices/input-output/",
                target = "_blank",
                options = "location=no";
   
       inAppBrowserRef = cordova.InAppBrowser.open(url, target, options);
   ```
   Tried fetching device information using 
   ```
    navigator.mediaDevices.getUserMedia({
         'audio': true,
         'video': {
             facingMode: 'environment'
         }
     })
   ```
   Fetching device information on browser using *navigator.mediaDevices.getUserMedia* works as expected, but not able to work on android device
   
   
   ### Environment, Platform, Device
   In all Android devices( targeting 4.4 - 9.0.0)
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
     ```
       Node version:  tried both v6.10.3 and v14.2.0, 
       NPM version:  v3.10.10,
      "cordova-android": "^8.1.0",
       "cordova-plugin-camera": "^4.1.0",
       "cordova-plugin-inappbrowser": "^4.0.0",
       "cordova-plugin-media-capture": "^3.0.3"
   ```
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues, [https://github.com/apache/cordova-plugin-inappbrowser/issues/706]( found similar one involving Ionic)
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org