|
|
@@ -827,7 +827,7 @@ export default class JingleSessionPC extends JingleSession {
|
|
827
|
827
|
const oldLocalSdp
|
|
828
|
828
|
= this.peerconnection.localDescription.sdp;
|
|
829
|
829
|
|
|
830
|
|
- this._renegotiate(newRemoteSdp)
|
|
|
830
|
+ this._renegotiate(newRemoteSdp.raw)
|
|
831
|
831
|
.then(() => {
|
|
832
|
832
|
if (this.state === JingleSessionState.PENDING) {
|
|
833
|
833
|
this.state = JingleSessionState.ACTIVE;
|
|
|
@@ -1250,7 +1250,7 @@ export default class JingleSessionPC extends JingleSession {
|
|
1250
|
1250
|
? this._processRemoteAddSource(addOrRemoveSsrcInfo)
|
|
1251
|
1251
|
: this._processRemoteRemoveSource(addOrRemoveSsrcInfo);
|
|
1252
|
1252
|
|
|
1253
|
|
- this._renegotiate(newRemoteSdp)
|
|
|
1253
|
+ this._renegotiate(newRemoteSdp.raw)
|
|
1254
|
1254
|
.then(() => {
|
|
1255
|
1255
|
const newLocalSdp
|
|
1256
|
1256
|
= new SDP(this.peerconnection.localDescription.sdp);
|
|
|
@@ -1355,7 +1355,7 @@ export default class JingleSessionPC extends JingleSession {
|
|
1355
|
1355
|
|
|
1356
|
1356
|
/**
|
|
1357
|
1357
|
* Do a new o/a flow using the existing remote description
|
|
1358
|
|
- * @param {SDP object} optionalRemoteSdp optional remote sdp
|
|
|
1358
|
+ * @param {string} [optionalRemoteSdp] optional, raw remote sdp
|
|
1359
|
1359
|
* to use. If not provided, the remote sdp from the
|
|
1360
|
1360
|
* peerconnection will be used
|
|
1361
|
1361
|
* @returns {Promise} promise which resolves when the
|
|
|
@@ -1363,12 +1363,8 @@ export default class JingleSessionPC extends JingleSession {
|
|
1363
|
1363
|
* rejects with an error {string}
|
|
1364
|
1364
|
*/
|
|
1365
|
1365
|
_renegotiate(optionalRemoteSdp) {
|
|
1366
|
|
- const currentRemoteSdp = this.peerconnection.remoteDescription.sdp;
|
|
1367
|
|
-
|
|
1368
|
|
- // FIXME new SDP() may not be necessary - raw SDP is needed anyway
|
|
1369
|
1366
|
const remoteSdp
|
|
1370
|
|
- = optionalRemoteSdp
|
|
1371
|
|
- || (currentRemoteSdp && new SDP(currentRemoteSdp));
|
|
|
1367
|
+ = optionalRemoteSdp || this.peerconnection.remoteDescription.sdp;
|
|
1372
|
1368
|
|
|
1373
|
1369
|
if (!remoteSdp) {
|
|
1374
|
1370
|
return Promise.reject(
|
|
|
@@ -1378,7 +1374,7 @@ export default class JingleSessionPC extends JingleSession {
|
|
1378
|
1374
|
|
|
1379
|
1375
|
const remoteDescription = new RTCSessionDescription({
|
|
1380
|
1376
|
type: this.isInitiator ? 'answer' : 'offer',
|
|
1381
|
|
- sdp: remoteSdp.raw
|
|
|
1377
|
+ sdp: remoteSdp
|
|
1382
|
1378
|
});
|
|
1383
|
1379
|
|
|
1384
|
1380
|
return new Promise((resolve, reject) => {
|