|
@@ -149,6 +149,9 @@ export default class JingleConnectionPlugin extends ConnectionPlugin {
|
149
|
149
|
logger.info(
|
150
|
150
|
`Marking session from ${fromJid
|
151
|
151
|
} as ${isP2P ? '' : '*not*'} P2P`);
|
|
152
|
+
|
|
153
|
+ const iceConfig = isP2P ? this.p2pIceConfig : this.jvbIceConfig;
|
|
154
|
+
|
152
|
155
|
sess
|
153
|
156
|
= new JingleSessionPC(
|
154
|
157
|
$(iq).find('jingle').attr('sid'),
|
|
@@ -156,7 +159,10 @@ export default class JingleConnectionPlugin extends ConnectionPlugin {
|
156
|
159
|
fromJid,
|
157
|
160
|
this.connection,
|
158
|
161
|
this.mediaConstraints,
|
159
|
|
- isP2P ? this.p2pIceConfig : this.jvbIceConfig,
|
|
162
|
+
|
|
163
|
+ // Makes a copy in order to prevent exception thrown on RN when either this.p2pIceConfig or
|
|
164
|
+ // this.jvbIceConfig is modified and there's a PeerConnection instance holding a reference
|
|
165
|
+ JSON.parse(JSON.stringify(iceConfig)),
|
160
|
166
|
isP2P,
|
161
|
167
|
/* initiator */ false);
|
162
|
168
|
|