react-native-webrtc: Android: App crashing on android 5 and 6
Tested app with releases 106.0.1 to 106.0.4 of this library across emulators/physical devices from API 22 (android 5) to API 33 (android 13). Do I need to make more changes in the API calls, compared to those in releases 1.106.1 and below ?
Expected Behavior
App with webrtc working across API 22 to API 33 When remote peer joins the room, peer connection successful.
Observed Behavior
It crashes on API 22 (tested on real device) and API 23 (tested in emulator) as and when the remote stream comes. Before that, user can view local stream, toggle camera, while having joined the room. But works good enough on API 24 and above
Steps to reproduce the issue
With the required setting for webrtc peer connection (which was previously working for 1.106.1 and below),
replaced peerConnection.onAddStream with peerConnection.onTrack
peerConnection.onTrack = async (event) => { event.streams?.forEach((stream) => {doSomethingWithRemoteStream(stream)}) }
and peerConnection.addStream(stream) with stream?.getTracks().forEach((track) => peerConnection.addTrack(track, stream))
Platform Information
- React Native Version: 0.66.5
- Gradle Plugin Version: 7.3.0
- OS: Android
- OS Version: API 22 to 33
- react: 17.0.2
- react-native-incall-manager: 4.0.1
- socket.io-client: 4.5.4
- minSdkVersion = 21
- compileSdkVersion = 31
- targetSdkVersion = 31
- google services plugin version: 4.3.14
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (7 by maintainers)
Is this enough ?