Telemetry capture published track updates (#367)
* Telemetry capture published track updates Signed-off-by: shishir gowda <shishir@livekit.io> * Updated OnVideoLayerUpdate to take slice of layers Signed-off-by: shishir gowda <shishir@livekit.io> * Update proto dep Signed-off-by: shishir gowda <shishir@livekit.io>
This commit is contained in:
@@ -90,6 +90,19 @@ func NewMediaTrack(track *webrtc.TrackRemote, params MediaTrackParams) *MediaTra
|
||||
t.buffer.SetLastFractionLostReport(fractionalLoss)
|
||||
}
|
||||
})
|
||||
t.MediaTrackReceiver.OnVideoLayerUpdate(func(layers []*livekit.VideoLayer) {
|
||||
for _, layer := range layers {
|
||||
t.params.Telemetry.TrackPublishedUpdate(context.Background(), t.PublisherID(),
|
||||
&livekit.TrackInfo{
|
||||
Sid: string(t.ID()),
|
||||
Type: livekit.TrackType_VIDEO,
|
||||
Muted: t.IsMuted(),
|
||||
Width: layer.Width,
|
||||
Height: layer.Height,
|
||||
Simulcast: t.IsSimulcast(),
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// on close signal via closing channel to workers
|
||||
t.AddOnClose(t.closeChan)
|
||||
|
||||
Reference in New Issue
Block a user