only create datachannel on side that sends invite

This commit is contained in:
Bruno Windels 2022-04-11 16:29:46 +02:00
parent d734a61447
commit fd5b2aa7bb

View File

@ -172,9 +172,6 @@ export class PeerCall implements IDisposable {
for (const t of this.localMedia.tracks) {
this.peerConnection.addTrack(t);
}
if (this.localMedia.dataChannelOptions) {
this._dataChannel = this.peerConnection.createDataChannel(this.localMedia.dataChannelOptions);
}
let myAnswer: RTCSessionDescriptionInit;
try {
myAnswer = await this.peerConnection.createAnswer();