androidwebrtcvideo-streaminglivehevc

How to Stream WebRTC H.265 (HEVC) Video in a React Native App?


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!


Solution

  • 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:

    This works for WebRTC H.265 live CCTV streams without transcoding.

    Key points:

    This is currently the most practical workaround until native WebRTC adds HEVC support in React Native.