Skip to content

Commit 94a6f85

Browse files
committed
Use the new interface for providing conf call functionality. Doesn't shoe it in the right room yet.
1 parent fd6e766 commit 94a6f85

File tree

6 files changed

+92
-351
lines changed

6 files changed

+92
-351
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323
"prepublish": "npm run build:css && npm run build:compile"
2424
},
2525
"dependencies": {
26-
"matrix-react-sdk": "^0.0.1",
2726
"classnames": "^2.1.2",
2827
"filesize": "^3.1.2",
2928
"flux": "~2.0.3",
29+
"linkifyjs": "^2.0.0-beta.4",
30+
"matrix-js-sdk": "^0.2.1",
31+
"matrix-react-sdk": "^0.0.1",
3032
"q": "^1.4.1",
3133
"react": "^0.13.3",
32-
"react-loader": "^1.4.0",
33-
"linkifyjs": "^2.0.0-beta.4"
34+
"react-loader": "^1.4.0"
3435
},
3536
"devDependencies": {
3637
"babel": "^5.8.23",

src/CallHandler.js

Lines changed: 0 additions & 281 deletions
This file was deleted.

src/controllers/molecules/voip/CallView.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ limitations under the License.
1616

1717
'use strict';
1818
var dis = require("../../../dispatcher");
19-
var CallHandler = require("../../../CallHandler");
19+
var CallHandler = require("matrix-react-sdk/lib/CallHandler");
2020
var MatrixClientPeg = require("../../../MatrixClientPeg");
2121

22+
var VectorConferenceHandler = require('./VectorConferenceHandler');
23+
2224
/*
2325
* State vars:
2426
* this.state.call = MatrixCall|null
@@ -66,7 +68,10 @@ module.exports = {
6668
},
6769

6870
showCall: function(roomId) {
69-
var call = CallHandler.getCallForRoom(roomId);
71+
var call = (
72+
CallHandler.getCallForRoom(roomId) ||
73+
VectorConferenceHandler.getConferenceCallForRoom(roomId)
74+
);
7075
if (call) {
7176
call.setLocalVideoElement(this.getVideoView().getLocalVideoElement());
7277
// N.B. the remote video element is used for playback for audio for voice calls
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1+
/*
2+
Copyright 2015 OpenMarket Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
"use strict";
18+
219
var q = require("q");
320
var Matrix = require("matrix-js-sdk");
421
var Room = Matrix.Room;
@@ -90,5 +107,12 @@ module.exports.getConferenceUserIdForRoom = function(roomId) {
90107
return "@" + USER_PREFIX + base64RoomId + ":" + DOMAIN;
91108
};
92109

110+
module.exports.createNewMatrixCall = function(client, roomId) {
111+
return new ConferenceCall(
112+
client, roomId
113+
);
114+
};
115+
93116
module.exports.ConferenceCall = ConferenceCall;
94117

118+
module.exports.slot = 'conference';

0 commit comments

Comments
 (0)