How to send camera stream to rtmp server by react native

Ehsan picture Ehsan · Sep 9, 2018 · Viewed 10.6k times · Source

I am trying to build a live stream video app. I built an rtmp server which is ready for publishing and playing streams. I need a way to capture mobile's user camera and send the online stream to my rtmp server.

I use react-native in client side. I found react-native-camera which is great in dealing with camera but I couldn't find any event/api available for accessing camera stream in their documentations.

Another problem is the way that I have to send the stream to rtmp server. I have no knowledge in this area so any kind of help will be appreciated.

Answer

Ehsan picture Ehsan · Sep 10, 2018

For anyone else who faces the same issue, This repo is the ultimate solution.

https://github.com/NodeMedia/react-native-nodemediaclient