Merge pull request #20006 from prlanzarin/u27/fix/audio-answerer-gum-failure
[2.7] fix(audio): acquire streams before negotiation when peer is answerer
This commit is contained in:
commit
e511535adc
@ -97,11 +97,20 @@ class AudioBroker extends BaseBroker {
|
|||||||
this.webRtcPeer.peerConnection.onconnectionstatechange = this.handleConnectionStateChange.bind(this);
|
this.webRtcPeer.peerConnection.onconnectionstatechange = this.handleConnectionStateChange.bind(this);
|
||||||
|
|
||||||
if (this.offering) {
|
if (this.offering) {
|
||||||
|
// We are the offerer
|
||||||
this.webRtcPeer.generateOffer()
|
this.webRtcPeer.generateOffer()
|
||||||
.then(this.sendStartReq.bind(this))
|
.then(this.sendStartReq.bind(this))
|
||||||
.catch(this._handleOfferGenerationFailure.bind(this));
|
.catch(this._handleOfferGenerationFailure.bind(this));
|
||||||
} else {
|
} else if (peerRole === 'recvonly') {
|
||||||
|
// We are the answerer and we are only listening, so we don't need
|
||||||
|
// to acquire local media
|
||||||
this.sendStartReq();
|
this.sendStartReq();
|
||||||
|
} else {
|
||||||
|
// We are the answerer and we are sending audio, so we need to acquire
|
||||||
|
// local media before sending the start request
|
||||||
|
this.webRtcPeer.mediaStreamFactory()
|
||||||
|
.then(() => { this.sendStartReq(); })
|
||||||
|
.catch(this._handleOfferGenerationFailure.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
|
Loading…
Reference in New Issue
Block a user