Эх сурвалжийг харах

Partially works

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 жил өмнө
parent
commit
c09e08c7fd

+ 1 - 4
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

@@ -274,10 +274,7 @@ public class CallActivity extends AppCompatActivity {
 
         //we already have video and audio tracks. Now create peerconnections
         iceServers = new ArrayList<>();
-        iceServers.add(new PeerConnection.IceServer("stun:stun.l.google.com:19302"));
-        //iceServers.add(new PeerConnection.IceServer("turn:mario:mario@172.104.225.9:3478"));
-        //iceServers.add(PeerConnection.IceServer.builder("http://172.104.225.9:3478").setUsername("mario").setPassword
-        //                ("mario").createIceServer());
+        iceServers.add(new PeerConnection.IceServer("stun:stun.nextcloud.com:443"));
 
         //create sdpConstraints
         sdpConstraints = new MediaConstraints();

+ 4 - 2
app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java

@@ -153,8 +153,10 @@ public class PeerConnectionWrapper {
                     EventBus.getDefault().post(new SessionDescriptionSendEvent(peerConnection.getLocalDescription(), sessionId,
                             peerConnection.getLocalDescription().type.canonicalForm(), null));
                 } else {
-                    drainIceCandidates();
-                    sendLocalCandidates();
+                    if (peerConnection.getRemoteDescription() != null) {
+                        drainIceCandidates();
+                        sendLocalCandidates();
+                    }
                 }
             }