React Native stream camera of Android phone output to RTSP

早过忘川 提交于 2020-05-29 09:38:53

问题


I would like to stream my Android phone camera to a server, but my server only accepts RTSP. I have tried using react-native-nodemediaclient output RTMP which working well, but I don't want to write a RTMP to RTSP converter which is not optimal solution. So is there any way to implement it, I have searched Google but I cannot find the answer.


回答1:


You can use the following library react-native-vlc-player to stream rtsp

Example

<View style={styles.body}>
        <VLCPlayer
          ref={(ref) => (this.vlcPlayer = ref)}
          style={{width: '100%', height: 200}}
          videoAspectRatio="16:9"
          source={{
            uri:
              'rtsp://admin:pass@IP:554/Streaming/Channels/102',
          }}
        />
      </View>


来源:https://stackoverflow.com/questions/59151067/react-native-stream-camera-of-android-phone-output-to-rtsp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!