Android WebRTC - How to fix PeerConnection.createOffer error "Create CreateOffer with invalid media streams"?

Following this tutorial, I have successfully created a GLSurfaceView that displays my local video in my android app. I am using Pristine gradle build scripts to use native code for webrtc. The web app works as expected in Chrome.

I have established a websockets connection to my nodejs server to join an already existing chain. Kurento is used to work with rooms. I believe I need to create an SDP proposal to start sending and receiving videos between peers at this stage. (To start, I just want the video from the Android device to be displayed in the web interface.)

However, if I create a PeerConnection and add my local media stream (created with PeerConnectionFactory.createLocalMediaStream) and then call createOffer (), it doesn't work.

The SDPObserver listening on my connection receives an onCreateFailure call with the message "CreateOffer being called with invalid media streams".

Looking at the C code, it seems that the streams do not have unique IDs (despite the fact that I only created one stream).

I have been trying to figure this out throughout the day and haven't seemed to make any progress. Any suggestions?

Thanks in advance!

+3


source to share





All Articles