@@ -181,7 +181,7 @@ func signalPeerConnections() {
181
181
return true
182
182
}
183
183
184
- log .Infof ("Send offer to client: %v\n " , offer )
184
+ log .Infof ("Send offer to client: %v" , offer )
185
185
186
186
if err = peerConnections [i ].websocket .WriteJSON (& websocketMessage {
187
187
Event : "offer" ,
@@ -282,7 +282,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
282
282
return
283
283
}
284
284
285
- log .Infof ("Send candidate to client: %s\n " , candidateString )
285
+ log .Infof ("Send candidate to client: %s" , candidateString )
286
286
287
287
if writeErr := c .WriteJSON (& websocketMessage {
288
288
Event : "candidate" ,
@@ -294,7 +294,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
294
294
295
295
// If PeerConnection is closed remove it from global list
296
296
peerConnection .OnConnectionStateChange (func (p webrtc.PeerConnectionState ) {
297
- log .Infof ("Connection state change: %s\n " , p )
297
+ log .Infof ("Connection state change: %s" , p )
298
298
299
299
switch p {
300
300
case webrtc .PeerConnectionStateFailed :
@@ -308,7 +308,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
308
308
})
309
309
310
310
peerConnection .OnTrack (func (t * webrtc.TrackRemote , _ * webrtc.RTPReceiver ) {
311
- log .Infof ("Got remote track: Kind=%s, ID=%s, PayloadType=%d\n " , t .Kind (), t .ID (), t .PayloadType ())
311
+ log .Infof ("Got remote track: Kind=%s, ID=%s, PayloadType=%d" , t .Kind (), t .ID (), t .PayloadType ())
312
312
313
313
// Create a track to fan out our incoming video to all peers
314
314
trackLocal := addTrack (t )
@@ -338,7 +338,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
338
338
})
339
339
340
340
peerConnection .OnICEConnectionStateChange (func (is webrtc.ICEConnectionState ) {
341
- log .Infof ("ICE connection state changed: %s\n " , is )
341
+ log .Infof ("ICE connection state changed: %s" , is )
342
342
})
343
343
344
344
// Signal for the new PeerConnection
@@ -367,7 +367,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
367
367
return
368
368
}
369
369
370
- log .Infof ("Got candidate: %v\n " , candidate )
370
+ log .Infof ("Got candidate: %v" , candidate )
371
371
372
372
if err := peerConnection .AddICECandidate (candidate ); err != nil {
373
373
log .Errorf ("Failed to add ICE candidate: %v" , err )
@@ -380,7 +380,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
380
380
return
381
381
}
382
382
383
- log .Infof ("Got answer: %v\n " , answer )
383
+ log .Infof ("Got answer: %v" , answer )
384
384
385
385
if err := peerConnection .SetRemoteDescription (answer ); err != nil {
386
386
log .Errorf ("Failed to set remote description: %v" , err )
0 commit comments