on reinvite setLocalDescription happening before addtrack

Skip to first unread message

Metehan Metin

Mar 2, 2022, 9:29:44 AMMar 2
to JsSIP
I am trying to implement renegotiation with reinvite.
1 - starting an audio call
2- adding video stream to rtcpeerconnection and calling renegotiate.
3- after calling renegotiate the invite is going with video SDP
4- on the answerer side, I am binding to the reinvite event. Reinvite is triggering when I get the reinvite.
5- In the reinvite, I want to add a video track of the answerer.It is happening but before I add the video track. API is handling setlocaldescription and sending 200 okay.

How can I prevent this? Am I doing something wrong?

->reinvite part of RTCSession.js

      this.emit('reinvite', data);
        this._connectionPromiseQueue = this._connectionPromiseQueue.then(function () {
          return _this14._createLocalDescription('offer', _this14._rtcOfferConstraints);
        }).then(function (sdp) {
          sendAnswer.call(_this14, sdp);
        })["catch"](function () {

Reply all
Reply to author
0 new messages