Handle UpdateLocalAudioTrack and UpdateLocalVideoTrack. (#2684)
* Handle UpdateLocalAudioTrack and UpdateLocalVideoTrack. - Update the TrackInfo - NOTE: populating Stereo and DisableDtx fields although there are features now. - The audio features in UpdateLocalAudioTrack is applied as is, i. e. the update has the latest set of features. - Emits a track update which will broadcast a participant update. TODO: ----- - Telemetry event with track update? * update deps
This commit is contained in:
@@ -1816,6 +1816,12 @@ func (p *ParticipantImpl) addPendingTrackLocked(req *livekit.AddTrackRequest) *l
|
||||
Encryption: req.Encryption,
|
||||
Stream: req.Stream,
|
||||
}
|
||||
if req.Stereo {
|
||||
ti.AudioFeatures = append(ti.AudioFeatures, livekit.AudioTrackFeature_TF_STEREO)
|
||||
}
|
||||
if req.DisableDtx {
|
||||
ti.AudioFeatures = append(ti.AudioFeatures, livekit.AudioTrackFeature_TF_NO_DTX)
|
||||
}
|
||||
if ti.Stream == "" {
|
||||
ti.Stream = StreamFromTrackSource(ti.Source)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user