mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: Fixed bug when addTransceiver not available (#634)
After generateOffer() refactoring, the deprecated legacy method wasn't adding the meadstream tracks on peerConnection object as it used to do.pull/635/head
parent
3f0756984a
commit
66b1ce790d
|
@ -171,6 +171,13 @@ export class WebRtcPeer {
|
||||||
// Transceivers, and instead depend on the deprecated
|
// Transceivers, and instead depend on the deprecated
|
||||||
// "offerToReceiveAudio" and "offerToReceiveVideo".
|
// "offerToReceiveAudio" and "offerToReceiveVideo".
|
||||||
|
|
||||||
|
if (!!this.configuration.mediaStream) {
|
||||||
|
for (const track of this.configuration.mediaStream.getTracks()) {
|
||||||
|
// @ts-ignore - Compiler is too clever and thinks this branch will never execute.
|
||||||
|
this.pc.addTrack(track, this.configuration.mediaStream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const hasAudio = this.configuration.mediaConstraints.audio;
|
const hasAudio = this.configuration.mediaConstraints.audio;
|
||||||
const hasVideo = this.configuration.mediaConstraints.video;
|
const hasVideo = this.configuration.mediaConstraints.video;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue