Option to control DTX (#25)

* protocol 4

* default to v4

* mediaStreamTrack.enabled

* track start

* private constructor

* remote audio/video tracks

* log sdp

* organize imports

* dtx option (default true)
This commit is contained in:
Hiroshi Horie
2021-10-26 02:53:34 +09:00
committed by GitHub
parent 71a21f00b6
commit 6240457333
7 changed files with 61 additions and 17 deletions
+10 -1
View File
@@ -155,16 +155,25 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
required String name,
required lk_models.TrackType type,
TrackDimension? dimension,
bool? dtx,
}) {
final req = lk_rtc.AddTrackRequest(
cid: cid,
name: name,
type: type,
);
if (dimension != null) {
if (type == lk_models.TrackType.VIDEO && dimension != null) {
// video specific
req.width = dimension.width;
req.height = dimension.height;
}
if (type == lk_models.TrackType.AUDIO && dtx != null) {
// audio specific
req.disableDtx = !dtx;
}
_sendRequest(lk_rtc.SignalRequest(
addTrack: req,
));