Open jense-arntz opened 6 years ago
The step-3 browser code may not be right. Check how the data is transferred (SDP and ice candidates). I did not concentrate on the web part and copied it from the webrtc codelabs. Android app code might be sending the data in a different format (JSON) than what the web is expecting. You can make the required changes to the js file to parse the data. Send me a PR if you made it work.
Thanks Vivek. as you mentioned above, android code will be working properly? I only need to make the browser code working?
Hi Vivek
Hi @jense-arntz yes the android to android part would be working. You need to make some changes to the browser code to make it work for Android <-> browser
Error is "Class CustomCameraEventsHandler.java must either be declared abstract or implement abstract method 'onCameraOpening(String)' in 'CameraEventsHandler'
-Issue on STEP3. There is no error occurred on Browser and Android when building peerconnection and completing the process 'Offer' and 'Answer'. I am suspicious if there is issue on iceserver.
Please help. thanks.
Please give me some hints.
@jense-arntz : The step-2 needs to be updated. Please refer to step-3 code for how to handle peer connection. WebRTC has removed many of the methods used in Step-2.
Step-3 browser to android would not work as I said earlier. Browser side code needs to be changed to accept offer and answer signalling messages in JSON format just as the Android client would expect.
as i understand from tutorial ( part 1 -- 4 ) the single server in that project is sokect io server i make a local server like this https://codelabs.developers.google.com/codelabs/webrtc-web/#6 and replace the url (" your_socket_io_instance_url_with_port") in SignallingClient class but remote vedio not work
This constructor gives me error. How you solved this error??
change build.gradle to this : implementation 'org.webrtc:google-webrtc:1.0.22672' to solve constructore and VideoRenderer error
@arfa-maddi @vivek1794 @darwish1994 can any people help me about key.pem. When i run signalling project i can't find any key.pem. Where i can find this?? or i have to make it own.
1.0.22672
Yes. this fixed my issue on VideoRenderer error
Appliaction is crashing on launch and gives the error xyz.vivekc.webrtccodelab E/AndroidRuntime: FATAL EXCEPTION: main Process: xyz.vivekc.webrtccodelab, PID: 11587 java.lang.NullPointerException at xyz.vivekc.webrtccodelab.MainActivity$1.onResponse(MainActivity.java:106)
@arfa-maddi You could create your own key.pem and cert using openssl for creating self signed certificate. @skumarm I think the Java code is not prepared to get not a valid answer while asking for iceServers at the signaller.
You could workaround by changing the code starting at line 103 like so:
if (body != null) {
iceServers = body.iceServerList.iceServers;
for (IceServer iceServer : iceServers) {
if (iceServer.credential == null) {
PeerConnection.IceServer peerIceServer = PeerConnection.IceServer.builder(iceServer.url).createIceServer();
peerIceServers.add(peerIceServer);
} else {
PeerConnection.IceServer peerIceServer = PeerConnection.IceServer.builder(iceServer.url)
.setUsername(iceServer.username)
.setPassword(iceServer.credential)
.createIceServer();
peerIceServers.add(peerIceServer);
}
}
Log.d("onApiResponse", "IceServers\n" + iceServers.toString());
}
}
EDIT: However, this project seems to be abandoned.
I did not find the time to update the project. Please raise a PR so that we can keep it updated.
Also, WebRTC changes their class names and methods so often that it is difficult to keep it updated for the current version. It should, however, work with the AAR file attached in this repo.
@arfa-maddi You could create your own key.pem and cert using openssl for creating self signed certificate.
@neilyoung Hi, I am having issue about key.pem and cer.pem. Should I just write the id_rsa and id_rsa.pub location (which ssh generated when the git configuration) down to replace key.pem and cer.pem?
@chutongz Your signaling server needs to be available as secure server. For that you need to either provide a "real" certificate or you can create your own self-signed certificate. There are tons of articles on the web regarding "How to create self-signed certificate using openssl". However, modern browsers meanwhile are making problems accepting a self-signed certificate, so in case you need to convince browsers that you are a trusted CA you need to do a bit more (or to take care about a little bit more) the time you are creating your self-singed certificate. This is excellently explained in this post https://fabianlee.org/2018/02/17/ubuntu-creating-a-trusted-ca-and-san-certificate-using-openssl-on-ubuntu/
@accuware Hi, thank you so much for replying me! Now I used openssl to create the key.pem and cert.pem already, but when I try the command "node index.js", it gave me error as below: Do you have any idea of this error? Is it because some thing wrong when I create the certification?
@chutongz Sorry, used the wrong account. It was me :) There is for sure a format problem. The cert is expected to be Base64 text, IMHO
@neilyoung Yes, I recreate the certification and run the command but nothing happend... Nothing returned, nothing printed... I waited for so long.... I am so confused and wondering if it comes up with the socket.io url? Because I haven't set it yet...
Well, I'm neither the creator nor a contributor of this app....
Once you have setup the server you should be able to test the connection using
telnet your.server 443
or whatever port the server is listening to.
@neilyoung OK! I'll try it anyway. Thanks so much for replying me again! :)
Hello everyone! Check that
remoteVideoTrack.addRenderer(new VideoRenderer(remoteVideoSurfaceViewRender));
or
remoteVideoTrack.addSink(remoteVideoSurfaceViewRender);
call after ALL ICE exchange occurred.
It depends on signalling and can cause a heavily detectable error
I have run the step3 application on Chrome Browser and Android app. Localvideo is working and remote video is not working.... what I missed?