I am trying to create a React Native app to stream live CCTV footage on a mobile device.
The Problem:
What I have tried:
What I Am Looking For:
I need a way to play WebRTC H.265 (HEVC) video inside a React Native app. Any solution would be helpful, such as:
If anyone has experience with this or knows of a solution, I would really appreciate your help!
Thanks in advance!
I ended up solving this by embedding WebRTC inside a WebView instead of using RTCView.
react-native-webrtc does not support H.265 (HEVC) decoding, but Chromium-based WebView does (from Chromium 136+) and Safari already supports it.
So instead of rendering the stream with RTCView, I:
Use a WebView
Run a pure WebRTC HTML player inside it
Do SDP offer/answer exchange between React Native ↔ WebView
Let the browser engine handle H.265 decoding
This works for WebRTC H.265 live CCTV streams without transcoding.
Key points:
No React Native WebRTC rendering
WebView handles <video> playback
RN only acts as a signaling bridge
Works on iOS (Safari) and Android (Chromium WebView)
This is currently the most practical workaround until native WebRTC adds HEVC support in React Native.