I have a URL that is recording the audio of the user but when I open that URL in my webview and try to record audio it does not record the audio of the user
I have already taken permissions for both Audio and External Storage
kindly guide me to solve this issue
import React, {useRef, useEffect} from 'react';
import {
SafeAreaView,
StyleSheet,
BackHandler,
PermissionsAndroid,
Platform,
} from 'react-native';
import {WebView} from 'react-native-webview';
const App = () => {
const webviewRef = useRef(null);
useEffect(() => {
const backHandler = BackHandler.addEventListener(
'hardwareBackPress',
() => {
if (webviewRef.current) {
// webviewRef.current.goBack();
return true;
}
return false;
},
);
if (Platform.OS === 'android') {
PermissionsAndroid.requestMultiple([
PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,
]).then(result => {
if (result['android.permission.RECORD_AUDIO'] !== 'granted') {
console.log('Microphone permission denied');
}
});
}
return () => backHandler.remove();
}, []);
return (
<SafeAreaView style={styles.container}>
<WebView
ref={webviewRef}
source={{uri: 'myURL(Private'}}
domStorageEnabled={true}
javaScriptEnabled={true}
mediaPlaybackRequiresUserAction={false}
/>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
export default App;
I cant show URL because it is private