add on track log.

This commit is contained in:
Miroslav Šedivý 2021-11-25 23:46:06 +01:00
parent 0075cdca2b
commit 096efe9b38

View File

@ -155,6 +155,14 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
iceTrickle: manager.config.ICETrickle, iceTrickle: manager.config.ICETrickle,
} }
connection.OnTrack(func(tr *webrtc.TrackRemote, r *webrtc.RTPReceiver) {
logger.Info().Interface("track", tr).Interface("receiver", r).Msg("got remote track")
})
connection.OnDataChannel(func(dc *webrtc.DataChannel) {
logger.Info().Interface("data-channel", dc).Msg("got remote data channel")
})
connection.OnNegotiationNeeded(func() { connection.OnNegotiationNeeded(func() {
logger.Warn().Msg("negotiation is needed") logger.Warn().Msg("negotiation is needed")