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:
Raja Subramanian
2024-04-26 12:06:35 +05:30
committed by GitHub
parent b55038af03
commit 90b47424b5
11 changed files with 588 additions and 42 deletions
+6
View File
@@ -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)
}