Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 54924a6

Browse files
jianjunztaste1981
authored andcommitted
Remove offerToReceiveAudio/offerToReceiveVideo. (#174)
These are legacy configurations.
1 parent b1c1122 commit 54924a6

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/sdk/conference/channel.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
191191
});
192192
this.dispatchEvent(messageEvent);
193193
this._internalId = data.id;
194-
const offerOptions = {
195-
offerToReceiveAudio: false,
196-
offerToReceiveVideo: false,
197-
};
198194
if (typeof this._pc.addTransceiver === 'function') {
199195
// |direction| seems not working on Safari.
200196
if (mediaOptions.audio && stream.mediaStream.getAudioTracks() > 0) {
@@ -205,7 +201,7 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
205201
}
206202
}
207203
let localDesc;
208-
this._pc.createOffer(offerOptions).then((desc) => {
204+
this._pc.createOffer().then((desc) => {
209205
if (options) {
210206
desc.sdp = this._setRtpReceiverOptions(desc.sdp, options);
211207
}
@@ -319,10 +315,6 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
319315
this.dispatchEvent(messageEvent);
320316
this._internalId = data.id;
321317
this._createPeerConnection();
322-
const offerOptions = {
323-
offerToReceiveAudio: !!options.audio,
324-
offerToReceiveVideo: !!options.video,
325-
};
326318
if (typeof this._pc.addTransceiver === 'function') {
327319
// |direction| seems not working on Safari.
328320
if (mediaOptions.audio) {
@@ -332,7 +324,7 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
332324
this._pc.addTransceiver('video', {direction: 'recvonly'});
333325
}
334326
}
335-
this._pc.createOffer(offerOptions).then((desc) => {
327+
this._pc.createOffer().then((desc) => {
336328
if (options) {
337329
desc.sdp = this._setRtpReceiverOptions(desc.sdp, options);
338330
}

0 commit comments

Comments
 (0)