Get conf calling working, apart from the end call button showing in the right room.
This commit is contained in:
parent
94a6f856d1
commit
3845a989f6
|
@ -15,11 +15,11 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
'use strict';
|
||||
var dis = require("../../../dispatcher");
|
||||
var dis = require("matrix-react-sdk/lib/dispatcher");
|
||||
var CallHandler = require("matrix-react-sdk/lib/CallHandler");
|
||||
var MatrixClientPeg = require("../../../MatrixClientPeg");
|
||||
var MatrixClientPeg = require("matrix-react-sdk/lib/MatrixClientPeg");
|
||||
|
||||
var VectorConferenceHandler = require('./VectorConferenceHandler');
|
||||
var VectorConferenceHandler = require('../../../modules/VectorConferenceHandler');
|
||||
|
||||
/*
|
||||
* State vars:
|
||||
|
|
|
@ -19,6 +19,7 @@ limitations under the License.
|
|||
var q = require("q");
|
||||
var Matrix = require("matrix-js-sdk");
|
||||
var Room = Matrix.Room;
|
||||
var CallHandler = require('matrix-react-sdk/lib/CallHandler');
|
||||
|
||||
// FIXME: This currently forces Vector to try to hit the matrix.org AS for conferencing.
|
||||
// This is bad because it prevents people running their own ASes from being used.
|
||||
|
@ -108,9 +109,24 @@ module.exports.getConferenceUserIdForRoom = function(roomId) {
|
|||
};
|
||||
|
||||
module.exports.createNewMatrixCall = function(client, roomId) {
|
||||
return new ConferenceCall(
|
||||
var confCall = new ConferenceCall(
|
||||
client, roomId
|
||||
);
|
||||
return confCall.setup();
|
||||
};
|
||||
|
||||
module.exports.getConferenceCallForRoom = function(roomId) {
|
||||
// search for a conference 1:1 call for this group chat room ID
|
||||
var activeCall = CallHandler.getAnyActiveCall();
|
||||
if (activeCall && activeCall.confUserId) {
|
||||
var thisRoomConfUserId = module.exports.getConferenceUserIdForRoom(
|
||||
roomId
|
||||
);
|
||||
if (thisRoomConfUserId === activeCall.confUserId) {
|
||||
return activeCall;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
module.exports.ConferenceCall = ConferenceCall;
|
||||
|
|
|
@ -20,7 +20,7 @@ var React = require('react');
|
|||
|
||||
var sdk = require('matrix-react-sdk')
|
||||
var CallViewController = require(
|
||||
"matrix-react-sdk/lib/controllers/molecules/voip/CallView"
|
||||
"../../../../../controllers/molecules/voip/CallView"
|
||||
);
|
||||
|
||||
module.exports = React.createClass({
|
||||
|
|
Loading…
Reference in New Issue