Skip to content

Commit a5e971a

Browse files
committed
Push to usermediaSenders in upgradeCall()
Signed-off-by: Šimon Brandner <[email protected]>
1 parent b074577 commit a5e971a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webrtc/call.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,13 +948,13 @@ export class MatrixCall extends EventEmitter {
948948

949949
const audioTrack = stream.getAudioTracks()[0];
950950
this.localUsermediaStream.addTrack(audioTrack);
951-
this.peerConn.addTrack(audioTrack, this.localUsermediaStream);
951+
this.usermediaSenders.push(this.peerConn.addTrack(audioTrack, this.localUsermediaStream));
952952
} else if (upgradeVideo) {
953953
if (this.hasLocalUserMediaVideoTrack) return;
954954

955955
const videoTrack = stream.getVideoTracks()[0];
956956
this.localUsermediaStream.addTrack(videoTrack);
957-
this.peerConn.addTrack(videoTrack, this.localUsermediaStream);
957+
this.usermediaSenders.push(this.peerConn.addTrack(videoTrack, this.localUsermediaStream));
958958
}
959959
} catch (error) {
960960
logger.error("Failed to upgrade the call", error);

0 commit comments

Comments
 (0)