Reputation: 1
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.
My WebRTC stream is in H.265 (HEVC) format, and React Native VLC media player can decode and play H.265 video.
However, since VLC requires a URL-based stream, I need to convert the WebRTC stream into an RTSP stream so I can provide an RTSP URL to the VLC player.
I also need to handle multiple WebRTC streams at the same time, so each stream should have its own RTSP URL.
How can I create a React Native native module in Java to convert a WebRTC MediaStream
into an RTSP stream in real time?
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