react native streaming with react-native-streaming

 import React, { Component } from 'react';

import { View } from 'react-native';

import { RTSPView } from 'react-native-streaming';


class CameraScreen extends Component {

  render() {

    return (

      <View style={{ flex: 1 }}>

        <RTSPView

          style={{ flex: 1 }}

          url="rtsp://192.168.1.16/video" // Replace with your IP camera's RTSP URL

          ref={(ref) => {

            this.rtsvp = ref;

          }}

          onConnectionSuccess={() => {

            console.log('RTSP connection successful');

          }}

          onConnectionFailed={() => {

            console.log('RTSP connection failed');

          }}

          onReady={() => {

            console.log('RTSP stream ready');

          }}

          onVideoEnd={() => {

            console.log('RTSP stream ended');

          }}

          onError={(err) => {

            console.log('RTSP error: ', err);

          }}

        />

      </View>

    );

  }

}


export default CameraScreen;


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