red5pro / react-native-red5pro

React Native Red5 Pro Publisher/Subscriber
https://www.red5pro.com/
Other
34 stars 20 forks source link

java.lang.NullPointerException when re-publish a live stream on Android #61

Open chungweileong94 opened 4 years ago

chungweileong94 commented 4 years ago

Step to reproduce:

  1. Publish a live stream
  2. Swap the camera to back-facing camera
  3. Unpublish the live stream
  4. Publish a new live stream again

Expected Result: Everything should work fine

Actual Result: App crashed

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.setDisplayOrientation(int)' on a null object reference

It's only happening when I unpublish with the back-facing camera, at least in my case.