]> git.feebdaed.xyz Git - gomehub.git/commitdiff
ice server
authorseantywork <seantywork@gmail.com>
Thu, 20 Jun 2024 06:29:00 +0000 (15:29 +0900)
committerseantywork <seantywork@gmail.com>
Thu, 20 Jun 2024 06:29:00 +0000 (15:29 +0900)
pkg/stream/stream_peers_signal.go
public/js/peers.js

index 9d1e417225954a5cbf870c5cc847ab66123e6651..e6b6c6c0c3bf35592d94c291379300f08f73f538 100644 (file)
@@ -264,13 +264,13 @@ func roomSignalHandler(w http.ResponseWriter, r *http.Request) {
 
        // Create new PeerConnection
        peerConnection, err := webrtc.NewPeerConnection(webrtc.Configuration{
-               ICEServers: []webrtc.ICEServer{
-                       {
-                               URLs:       []string{TURN_SERVER_ADDR[0].Addr},
-                               Username:   TURN_SERVER_ADDR[0].Id,
-                               Credential: TURN_SERVER_ADDR[0].Pw,
-                       },
-               },
+               //              ICEServers: []webrtc.ICEServer{
+               //                      {
+               //                              URLs:       []string{TURN_SERVER_ADDR[0].Addr},
+               //                              Username:   TURN_SERVER_ADDR[0].Id,
+               //                              Credential: TURN_SERVER_ADDR[0].Pw,
+               //                      },
+               //              },
        })
        if err != nil {
                log.Print(err)
index 0e39119213269892de49229b26c5b9f34645988a..f36ecc6be95d4831825f538c90e29f9a5bd3581b 100644 (file)
@@ -15,13 +15,13 @@ function initPeers(){
         .then(function(stream){
 
             pc = new RTCPeerConnection({
-                //        iceServers: [
-                //            {
-                //                urls: TURN_SERVER_ADDRESS.addr,
-                //                username: TURN_SERVER_ADDRESS.id,
-                //                credential: TURN_SERVER_ADDRESS.pw
-                //            }
-                //        ]
+                        iceServers: [
+                            {
+                                urls: TURN_SERVER_ADDRESS.addr,
+                                username: TURN_SERVER_ADDRESS.id,
+                                credential: TURN_SERVER_ADDRESS.pw
+                            }
+                        ]
                     })
                 
             document.getElementById('localVideo').srcObject = stream