Skip to content

Commit

Permalink
[SDK] Temporarily remove the rtx payload for Flutter.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Mar 19, 2020
1 parent 0d9f9dc commit 06d6a32
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions sdk/flutter/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ class Client extends EventEmitter {
"rate": 90000,
"encoding": null
},
{"payload": rtx, "codec": "rtx", "rate": 90000, "encoding": null}
//{"payload": rtx, "codec": "rtx", "rate": 90000, "encoding": null}
];

var fmtp = [
{"payload": rtx, "config": "apt=$payload"}
//{"payload": rtx, "config": "apt=$payload"}
];

if (payload == DefaultPayloadTypeH264) {
Expand All @@ -336,11 +336,24 @@ class Client extends EventEmitter {
{"payload": payload, "type": "nack", "subtype": "pli"}
];

session['media'][videoIdx]["payloads"] = '$payload $rtx';
session['media'][videoIdx]["payloads"] = '$payload'; // $rtx';
session['media'][videoIdx]["rtp"] = rtp;
session['media'][videoIdx]["fmtp"] = fmtp;
session['media'][videoIdx]["rtcpFb"] = rtcpFB;

if (session['media'][videoIdx]['ssrcGroups'] != null) {
var ssrcGroup = session['media'][videoIdx]['ssrcGroups'][0];
var ssrcs = ssrcGroup['ssrcs'];
var videoSsrc = ssrcs.split(" ")[0];
logger.debug('ssrcs => $ssrcs, video $videoSsrc');

List newSsrcs = session['media'][videoIdx]['ssrcs'] as List;
newSsrcs.removeWhere((item) => '${item['id']}' != videoSsrc);

session['media'][videoIdx]['ssrcGroups'] = [];
session['media'][videoIdx]['ssrcs'] = newSsrcs;
}

if (sender) {
session['media'][videoIdx]["direction"] = "sendonly";
} else {
Expand Down

0 comments on commit 06d6a32

Please sign in to comment.