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

index e6b6c6c0c3bf35592d94c291379300f08f73f538..a316085a843c2c2f98288a6b8fd17224eef42758 100644 (file)
@@ -264,14 +264,15 @@ 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)
                return
index f36ecc6be95d4831825f538c90e29f9a5bd3581b..ae6226a425158621a533ec1a91fde1249f82240f 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