add video id for webrtc metrics.

This commit is contained in:
Miroslav Šedivý
2022-07-03 23:21:25 +02:00
parent e4261c53b1
commit 3fda00bac5
2 changed files with 37 additions and 0 deletions

View File

@ -138,6 +138,8 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
return nil, types.ErrWebRTCVideoNotFound
}
manager.metrics.SetVideoID(session, videoID)
connection, err := manager.newPeerConnection([]codec.RTPCodec{
audioStream.Codec(),
videoStream.Codec(),
@ -201,6 +203,7 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
return types.ErrWebRTCVideoNotFound
}
manager.metrics.SetVideoID(session, videoID)
return videoTrack.SetStream(videoStream)
},
setPaused: func(isPaused bool) {