You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Cheekily fix screen sharing with audio
This commit is contained in:
@@ -522,17 +522,14 @@ MatrixCall.prototype._gotUserMediaForInvite = function(stream) {
|
|||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.screenSharingStream.addTrack(stream.getAudioTracks()[0]);
|
||||||
|
stream = this.screenSharingStream;
|
||||||
|
|
||||||
this.localAVStream = stream;
|
this.localAVStream = stream;
|
||||||
// why do we enable audio (and only audio) tracks here? -- matthew
|
// why do we enable audio (and only audio) tracks here? -- matthew
|
||||||
setTracksEnabled(stream.getAudioTracks(), true);
|
setTracksEnabled(stream.getAudioTracks(), true);
|
||||||
this.peerConn = _createPeerConnection(this);
|
this.peerConn = _createPeerConnection(this);
|
||||||
this.peerConn.addStream(stream);
|
this.peerConn.addStream(stream);
|
||||||
if (this.screenSharingStream) {
|
|
||||||
console.log("Adding screen-sharing stream to peer connection");
|
|
||||||
this.peerConn.addStream(this.screenSharingStream);
|
|
||||||
// let's use this for the local preview...
|
|
||||||
this.localAVStream = this.screenSharingStream;
|
|
||||||
}
|
|
||||||
this.peerConn.createOffer(
|
this.peerConn.createOffer(
|
||||||
hookCallback(self, self._gotLocalOffer),
|
hookCallback(self, self._gotLocalOffer),
|
||||||
hookCallback(self, self._getLocalOfferFailed)
|
hookCallback(self, self._getLocalOfferFailed)
|
||||||
|
|||||||
Reference in New Issue
Block a user