chore: 按照字符串打印sinkid

This commit is contained in:
ydajiang
2025-08-08 19:43:29 +08:00
parent cf7041150a
commit 1e730b8ef6

View File

@@ -105,10 +105,10 @@ func (s *Sink) StartStreaming(transStream stream.TransStream) error {
<-complete <-complete
connection.OnICEConnectionStateChange(func(state webrtc.ICEConnectionState) { connection.OnICEConnectionStateChange(func(state webrtc.ICEConnectionState) {
s.state = state s.state = state
log.Sugar.Infof("ice state: %v sink: %d source: %s", state.String(), s.GetID(), s.SourceID) log.Sugar.Infof("ice state: %v sink: %s source: %s", state.String(), stream.SinkID2String(s.GetID()), s.SourceID)
if state > webrtc.ICEConnectionStateDisconnected { if state > webrtc.ICEConnectionStateDisconnected {
log.Sugar.Errorf("webrtc peer断开连接 sink: %v source: %s", s.GetID(), s.SourceID) log.Sugar.Errorf("webrtc peer断开连接 sink: %s source: %s", stream.SinkID2String(s.GetID()), s.SourceID)
s.Close() s.Close()
} }
}) })