oney / RCTWebRTCDemo

MIT License
215 stars 142 forks source link

No video on Android #7

Closed norbertsongin closed 8 years ago

norbertsongin commented 8 years ago

I builded demo on Android 5.1.1 and successfuly connected with https://react-native-webrtc.herokuapp.com/ on my laptop. The problem is that there is no video (local nor remote) on the phone. After starting application there are thrown these exceptions:

02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: startCapture failed 02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: java.lang.RuntimeException: Fail to connect to camera service 02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.(Camera.java:520) at android.hardware.Camera.open(Camera.java:361) at org.webrtc.VideoCapturerAndroid.startCaptureOnCameraThread(VideoCapturerAndroid.java:350) at org.webrtc.VideoCapturerAndroid.access$1200(VideoCapturerAndroid.java:68) at org.webrtc.VideoCapturerAndroid$7.run(VideoCapturerAndroid.java:331) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:211) at android.os.HandlerThread.run(HandlerThread.java:61) 02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo I/org.webrtc.Logging: VideoCapturerAndroid: stopCaptureOnCameraThread 02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: Calling stopCapture() for already stopped camera.

The only difference in code is fix from here, everything else is untouched. Am i doing something wrong or is it currently not supported on Android?

jlognn commented 8 years ago

Same issue. I have followed all of the same steps and cannot get the RTCMediaStream to render at all.

oney commented 8 years ago

I just published 0.3.0. Please try to see whether the problem is fixed. You can also try Demo project. It should work with RN 0.20.0 on iOS and Android.

norbertsongin commented 8 years ago

Thank you for your answer, I will try it out tommorow and tell you if it works :)

norbertsongin commented 8 years ago

Ok, sorry for late response but i was really bussy lately. I've checked demo on Android today, and it works like a charm. Thank you for fixing it.