I am a bit of a webRTC savvy and responsive and I am tryin...">

Lack of access to local environments in the responsive native language <WebView / ">

I am a bit of a webRTC savvy and responsive and I am trying to load a webRTC demo site inside a responsive app.

So, I put this in index.android.js:

import React, {Component} from 'react';
import {AppRegistry, StyleSheet, Text, WebView} from 'react-native';

export default class testRTC extends Component {
  render() {
    return (
      <WebView
        source={{uri:'https://appr.tc/r/<Any random room number>'}}
        />
    );
  }
}

AppRegistry.registerComponent('testRTC', () => testRTC);

      

But on startup react-native run-android

when the WebView loads, I get the following message: "Could not access local environments. The error name was NotAllowedError" I tried adding the following permissions to AndroidManifest.xml, unsatisfactory:

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus"/>

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

      

I am trying to underestimate what I am missing, so I can load the demo app into my testRTC test app

+3


source to share





All Articles