Siddhesh Bhadale
Siddhesh Bhadale

Reputation: 1

How to Convert WebRTC MediaStream to RTSP in Real-Time for React Native VLC Player?

I am working on a React Native 0.78 app and using WebRTC for peer-to-peer (P2P) video streaming. I successfully set up a WebRTC connection and received a WebRTC stream as a MediaStream (MediaTrack format).

The problem is that I want to play this WebRTC stream using the React Native VLC media player (react-native-vlc-media-player), but the player only accepts URL-based streams (like RTSP or HTTP). My WebRTC stream does not have a URL, so I can't play it directly.

Why I Need RTSP?

What I Need Help With:

  1. How can I create a React Native native module in Java to convert a WebRTC MediaStream into an RTSP stream in real time?

  2. How can I manage multiple WebRTC streams and generate unique RTSP URLs for each?

I appreciate any help, sample code, or guidance on how to achieve this. Thanks!

Upvotes: 0

Views: 37

Answers (0)

Related Questions