@babblevoice/babble-drachtio-callmanager 1.6.17 → 1.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/call.js +6 -3
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -1010,7 +1010,9 @@ class call {
|
|
|
1010
1010
|
channeldef = call._createchannelremotedef( target.address, target.port, target.audio.payloads[ 0 ] )
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
-
|
|
1013
|
+
const other = this.other
|
|
1014
|
+
if( other && other.channels.audio ) this.channels.audio = await other.channels.audio.openchannel( channeldef, this._handlechannelevents.bind( this ) )
|
|
1015
|
+
else this.channels.audio = await projectrtp.openchannel( channeldef, this._handlechannelevents.bind( this ) )
|
|
1014
1016
|
|
|
1015
1017
|
this.sdp.local = sdpgen.create()
|
|
1016
1018
|
.addcodecs( this.selectedcodec )
|
|
@@ -1022,7 +1024,7 @@ class call {
|
|
|
1022
1024
|
}
|
|
1023
1025
|
|
|
1024
1026
|
if( this._iswebrtc ) {
|
|
1025
|
-
|
|
1027
|
+
const ch = this.channels.audio
|
|
1026
1028
|
this.sdp.local.addssrc( ch.local.ssrc )
|
|
1027
1029
|
.secure( ch.local.dtls.fingerprint, channeldef.remote.dtls.mode )
|
|
1028
1030
|
.addicecandidates( ch.local.address, ch.local.port, ch.local.icepwd )
|
|
@@ -2548,7 +2550,8 @@ class call {
|
|
|
2548
2550
|
if( newcall.options.late ) {
|
|
2549
2551
|
newcall.options.noAck = true /* this is a MUST for late negotiation */
|
|
2550
2552
|
} else {
|
|
2551
|
-
newcall.channels.audio = await
|
|
2553
|
+
if( options.parent && options.parent.channels.audio ) newcall.channels.audio = await options.parent.channels.audio.openchannel( newcall._handlechannelevents.bind( newcall ) )
|
|
2554
|
+
else newcall.channels.audio = await projectrtp.openchannel( newcall._handlechannelevents.bind( newcall ) )
|
|
2552
2555
|
|
|
2553
2556
|
newcall.sdp.local = sdpgen.create().addcodecs( newcall.options.preferedcodecs )
|
|
2554
2557
|
newcall.sdp.local.setaudioport( newcall.channels.audio.local.port )
|