Live

 import React, { Component } from 'react';

import { StyleSheet, Text, View } from 'react-native';

import Camera from 'react-native-camera';

import ObjectDetectionCamera from 'react-native-vision-camera';


export default class App extends Component {

  state = { 

    rtspUrl: 'rtsp://your_rtsp_url'  

  }


  handleObjectsDetected = objects => {

    console.log(objects);  

  }


  render() {

    return (

      <View style={styles.container}>

       <ObjectDetectionCamera

         style={styles.preview}

         uri={this.state.rtspUrl}

         onObjectDetected={this.handleObjectsDetected}

       />

      </View>

    );

  }

}


const styles = StyleSheet.create({

  container: {

    flex: 1,

    flexDirection: 'column',

    backgroundColor: 'black'

  },

  preview: {

    flex: 1,

    justifyContent: 'flex-end',

    alignItems: 'center'

  }

});

Comments

Popular posts from this blog

WR3D wwe 2k19 MOD apk direct download link for Android

Download wwe2k17 wr3d

How to make resizeable window in pygame and make content adjustable according to window size