Change ngrok candate log output
This commit is contained in:
@@ -46,6 +46,9 @@ func Init() {
|
|||||||
log.Warn().Err(err).Msg("[ngrok] add candidate")
|
log.Warn().Err(err).Msg("[ngrok] add candidate")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Info().Str("addr", address).Msg("[ngrok] add external candidate for WebRTC")
|
||||||
|
|
||||||
webrtc.AddCandidate(address)
|
webrtc.AddCandidate(address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,14 +34,14 @@ func Init() {
|
|||||||
address := cfg.Mod.Listen
|
address := cfg.Mod.Listen
|
||||||
pionAPI, err := webrtc.NewAPI(address)
|
pionAPI, err := webrtc.NewAPI(address)
|
||||||
if pionAPI == nil {
|
if pionAPI == nil {
|
||||||
log.Error().Err(err).Msg("[webrtc] Init API")
|
log.Error().Err(err).Msg("[webrtc] init API")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn().Err(err).Msg("[webrtc] Listen")
|
log.Warn().Err(err).Msg("[webrtc] listen")
|
||||||
} else if address != "" {
|
} else if address != "" {
|
||||||
log.Info().Str("addr", address).Msg("[webrtc] Listen")
|
log.Info().Str("addr", address).Msg("[webrtc] listen")
|
||||||
_, Port, _ = net.SplitHostPort(address)
|
_, Port, _ = net.SplitHostPort(address)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,6 @@ func Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func AddCandidate(address string) {
|
func AddCandidate(address string) {
|
||||||
log.Info().Str("addr", address).Msg("[webrtc] new candidate")
|
|
||||||
candidates = append(candidates, address)
|
candidates = append(candidates, address)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,6 +237,8 @@ func offerHandler(ctx *api.Context, msg *streamer.Message) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
address = ip.String() + address[4:]
|
address = ip.String() + address[4:]
|
||||||
|
|
||||||
|
log.Debug().Str("addr", address).Msg("[webrtc] stun public address")
|
||||||
}
|
}
|
||||||
|
|
||||||
cand, err := webrtc.NewCandidate(address)
|
cand, err := webrtc.NewCandidate(address)
|
||||||
@@ -259,7 +260,7 @@ func candidateHandler(ctx *api.Context, msg *streamer.Message) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if conn := ctx.Consumer.(*webrtc.Conn); conn != nil {
|
if conn := ctx.Consumer.(*webrtc.Conn); conn != nil {
|
||||||
log.Trace().Str("candidate", msg.Value.(string)).Msg("[webrtc] Remote")
|
log.Trace().Str("candidate", msg.Value.(string)).Msg("[webrtc] remote")
|
||||||
conn.Push(msg)
|
conn.Push(msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user