Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25854

Android: Grant Webview permissions for Audio/Video WebRTC streams

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: Release 7.0.2
    • Fix Version/s: None
    • Component/s: Android
    • Sprint:
      2018 Sprint 13 SDK, 2018 Sprint 14 SDK, 2018 Sprint 15 SDK, 2018 Sprint 16 SDK, 2016 Sprint 17 SDK, 2018 Sprint 18 SDK, 2018 Sprint 19 SDK, 2018 Sprint 20 SDK, 2018 Sprint 21, 2018 Sprint 22

      Description

      Problem
      When 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.

      How to/Example

      • Go to https://palava.tv/ and click "secret conference"
      • use this url for the webview [PALAVA_URL]
      • App will connect to this conference room

      var win = Ti.UI.createWindow({
              title: 'Form',
              backgroundColor: 'blue'
      });
       
      var www = Ti.UI.createWebView({
              url: "[PALAVA URL]"
      });
       
      win.add(www);
       
      var btn  = Ti.UI.createButton({
              title:"refresh",
              bottom:10
      })
      btn.addEventListener("click",function(){
              www.url = "[PALAVA_URL]";
      })
      win.add(btn);
      win.open();
      

      Add the permissions to tiapp.xml

      <android xmlns:android="http://schemas.android.com/apk/res/android">
      <manifest >
      	<uses-permission android:name="android.permission.RECORD_AUDIO" />
      	<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
      	<uses-permission android:name="android.permission.CAMERA"/>
      </manifest>
      </android>
      

      Current status

      • Not working with 7.0.2.GA and 7.1.0 (master)

      Test env

      • Android 7
      • HTC A9

      Solution

      • Grand permission in Webview

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              michael Michael Gangolf
            • Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code