mirror of
https://github.com/livekit/livekit.git
synced 2026-07-09 12:21:59 +00:00
Set mime_type for tracks don't have simulcast_codecs (#3040)
go sdk don't have simucalst_codecs set could cause partial track info broadcast to other nodes.
This commit is contained in:
@@ -2184,6 +2184,10 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
||||
}
|
||||
|
||||
ti.MimeType = track.Codec().MimeType
|
||||
// set mime_type for tracks that the AddTrackRequest do not have simulcast_codecs set
|
||||
if len(ti.Codecs) == 1 && ti.Codecs[0].MimeType == "" {
|
||||
ti.Codecs[0].MimeType = track.Codec().MimeType
|
||||
}
|
||||
if utils.TimedVersionFromProto(ti.Version).IsZero() {
|
||||
// only assign version on a fresh publish, i. e. avoid updating version in scenarios like migration
|
||||
ti.Version = p.params.VersionGenerator.Next().ToProto()
|
||||
|
||||
Reference in New Issue
Block a user