react native webview for video
import React from 'react';
import { View, WebView, StyleSheet } from 'react-native';
const CameraScreen = () => {
return (
<View style={styles.container}>
<WebView
source={{ uri: 'http://192.168.1.16' }} // Replace with your IP camera's URL
style={styles.webView}
javaScriptEnabled={true}
domStorageEnabled={true}
allowsFullscreenVideo={true}
mediaPlaybackRequiresUserAction={false}
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'black',
},
webView: {
flex: 1,
alignSelf: 'stretch',
},
});
export default CameraScreen;
Comments
Post a Comment