Don't allow camera and mic permissions by default. Notify user about permission request

This commit is contained in:
Volodymyr Kozieiev
2020-08-03 11:18:45 +03:00
parent 3bef57fcf8
commit f7a3d58b2f
23 changed files with 264 additions and 78 deletions
+27
View File
@@ -0,0 +1,27 @@
import React, {Component} from 'react';
import {Text, View} from 'react-native';
import WebView from 'react-native-webview';
type Props = {};
type State = {};
export default class Permission extends Component<Props, State> {
state = {};
render() {
return (
<View style={{ height: 120 }}>
<WebView
ref={(ref) => (this.webview = ref)}
onPermissionRequest={(event) => {
console.log("!!! JS: onPermissionRequest, event: ", event.nativeEvent);
this.webview.answerPermissionRequest(false, event.nativeEvent.resources );
}}
source={{uri: 'https://fatal0.netlify.app/android/webviewvideo.html'}}
automaticallyAdjustContentInsets={false}
/>
</View>
);
}
}