|
@@ -410,10 +410,10 @@ export class TPCUtils {
|
410
|
410
|
.filter(t => t.receiver && t.receiver.track && t.receiver.track.kind === mediaType);
|
411
|
411
|
const localTracks = this.pc.getLocalTracks(mediaType);
|
412
|
412
|
|
413
|
|
- transceivers.forEach(transceiver => {
|
|
413
|
+ transceivers.forEach((transceiver, idx) => {
|
414
|
414
|
if (active) {
|
415
|
|
- if (localTracks.length) {
|
416
|
|
- // FIXME should adjust only the direction of the local sender or FF will fall into renegotiate loop
|
|
415
|
+ // The first transceiver is for the local track and only this one can be set to 'sendrecv'
|
|
416
|
+ if (idx === 0 && localTracks.length) {
|
417
|
417
|
transceiver.direction = 'sendrecv';
|
418
|
418
|
} else {
|
419
|
419
|
transceiver.direction = 'recvonly';
|