You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-09-01 21:21:58 +03:00
Make inbound calls work.
This commit is contained in:
@@ -1495,7 +1495,7 @@ function setupCallEventHandler(client) {
|
||||
else {
|
||||
if (call.state !== 'ended') {
|
||||
call._onHangupReceived(content);
|
||||
client.callList[content.call_id] = undefined; // delete the call
|
||||
delete client.callList[content.call_id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -68,13 +68,13 @@ MatrixCall.prototype.placeVoiceCall = function() {
|
||||
|
||||
/**
|
||||
* Place a video call to this room.
|
||||
* @param {Element} localVideoElement a <code><video></code> DOM element
|
||||
* to render the local camera preview.
|
||||
* @param {Element} remoteVideoElement a <code><video></code> DOM element
|
||||
* to render video to.
|
||||
* @param {Element} localVideoElement a <code><video></code> DOM element
|
||||
* to render the local camera preview.
|
||||
* @throws If you have not specified a listener for 'error' events.
|
||||
*/
|
||||
MatrixCall.prototype.placeVideoCall = function(localVideoElement, remoteVideoElement) {
|
||||
MatrixCall.prototype.placeVideoCall = function(remoteVideoElement, localVideoElement) {
|
||||
checkForErrorListener(this);
|
||||
this.localVideoElement = localVideoElement;
|
||||
this.remoteVideoElement = remoteVideoElement;
|
||||
@@ -309,7 +309,7 @@ MatrixCall.prototype._gotUserMediaForAnswer = function(stream) {
|
||||
'OfferToReceiveVideo': self.type == 'video'
|
||||
},
|
||||
};
|
||||
self.peerConn.createAnswer(constraints, function(description) {
|
||||
self.peerConn.createAnswer(function(description) {
|
||||
debuglog("Created answer: " + description);
|
||||
self.peerConn.setLocalDescription(description, function() {
|
||||
var content = {
|
||||
@@ -324,7 +324,7 @@ MatrixCall.prototype._gotUserMediaForAnswer = function(stream) {
|
||||
self.state = 'connecting';
|
||||
}, function() {
|
||||
debuglog("Error setting local description!");
|
||||
});
|
||||
}, constraints);
|
||||
});
|
||||
self.state = 'create_answer';
|
||||
};
|
||||
|
Reference in New Issue
Block a user