On the Web, you can record a WebRTC stream with MediaRecorder or use MediaStreamTrackProcessor to pull PCM and encode (WAV/MP3/AAC).
On Android native (including React Native), those are Web APIs and are not available. The org.webrtc Android SDK doesn’t expose a playout PCM callback, and react-native-webrtc doesn’t implement MediaRecorder/MediaStreamTrackProcessor.
Viable approaches on Android:- Fork/patch org.webrtc to add a playout PCM callback (e.g., in JavaAudioDeviceModule/WebRtcAudioTrack). This lets you tap the remote audio frames (similar to a custom RTCAudioDevice on iOS) and feed your encoder/muxer.
- Use Android 10+ AudioPlaybackCapture via MediaProjection to capture the app’s playback and encode it. This requires a user permission prompt and captures device/app audio rather than just a specific WebRTC track.
If you need parity with an iOS custom RTCAudioDevice intercept, the forked org.webrtc approach is the closest match.