@@ -191,10 +191,6 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
191
191
} ) ;
192
192
this . dispatchEvent ( messageEvent ) ;
193
193
this . _internalId = data . id ;
194
- const offerOptions = {
195
- offerToReceiveAudio : false ,
196
- offerToReceiveVideo : false ,
197
- } ;
198
194
if ( typeof this . _pc . addTransceiver === 'function' ) {
199
195
// |direction| seems not working on Safari.
200
196
if ( mediaOptions . audio && stream . mediaStream . getAudioTracks ( ) > 0 ) {
@@ -205,7 +201,7 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
205
201
}
206
202
}
207
203
let localDesc ;
208
- this . _pc . createOffer ( offerOptions ) . then ( ( desc ) => {
204
+ this . _pc . createOffer ( ) . then ( ( desc ) => {
209
205
if ( options ) {
210
206
desc . sdp = this . _setRtpReceiverOptions ( desc . sdp , options ) ;
211
207
}
@@ -319,10 +315,6 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
319
315
this . dispatchEvent ( messageEvent ) ;
320
316
this . _internalId = data . id ;
321
317
this . _createPeerConnection ( ) ;
322
- const offerOptions = {
323
- offerToReceiveAudio : ! ! options . audio ,
324
- offerToReceiveVideo : ! ! options . video ,
325
- } ;
326
318
if ( typeof this . _pc . addTransceiver === 'function' ) {
327
319
// |direction| seems not working on Safari.
328
320
if ( mediaOptions . audio ) {
@@ -332,7 +324,7 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
332
324
this . _pc . addTransceiver ( 'video' , { direction : 'recvonly' } ) ;
333
325
}
334
326
}
335
- this . _pc . createOffer ( offerOptions ) . then ( ( desc ) => {
327
+ this . _pc . createOffer ( ) . then ( ( desc ) => {
336
328
if ( options ) {
337
329
desc . sdp = this . _setRtpReceiverOptions ( desc . sdp , options ) ;
338
330
}
0 commit comments