Temporarily disable Jitsi default

This commit is contained in:
Richard Lewis 2017-06-27 11:38:14 +01:00
parent 18ea76b864
commit 1f1352786f

View file

@ -152,41 +152,53 @@ export default class MessageComposer extends React.Component {
}); });
} }
_startCallApp(isAudioConf) { // _startCallApp(isAudioConf) {
dis.dispatch({ // dis.dispatch({
action: 'appsDrawer', // action: 'appsDrawer',
show: true, // show: true,
}); // });
const appsStateEvents = this.props.room.currentState.getStateEvents('im.vector.modular.widgets', ''); // const appsStateEvents = this.props.room.currentState.getStateEvents('im.vector.modular.widgets', '');
let appsStateEvent = {}; // let appsStateEvent = {};
if (appsStateEvents) { // if (appsStateEvents) {
appsStateEvent = appsStateEvents.getContent(); // appsStateEvent = appsStateEvents.getContent();
} // }
if (!appsStateEvent.videoConf) { // if (!appsStateEvent.videoConf) {
appsStateEvent.videoConf = { // appsStateEvent.videoConf = {
type: 'jitsi', // type: 'jitsi',
url: 'http://localhost:8000/jitsi.html', // url: 'http://localhost:8000/jitsi.html',
data: { // data: {
confId: this.props.room.roomId.replace(/[^A-Za-z0-9]/g, '_') + Date.now(), // confId: this.props.room.roomId.replace(/[^A-Za-z0-9]/g, '_') + Date.now(),
isAudioConf: isAudioConf, // isAudioConf: isAudioConf,
}, // },
}; // };
MatrixClientPeg.get().sendStateEvent( // MatrixClientPeg.get().sendStateEvent(
this.props.room.roomId, // this.props.room.roomId,
'im.vector.modular.widgets', // 'im.vector.modular.widgets',
appsStateEvent, // appsStateEvent,
'', // '',
).then(() => console.log('Sent state'), (e) => console.error(e)); // ).then(() => console.log('Sent state'), (e) => console.error(e));
} // }
} // }
onCallClick(ev) { onCallClick(ev) {
this._startCallApp(false); // NOTE -- Will be replaced by Jitsi code (currently commented)
dis.dispatch({
action: 'place_call',
type: ev.shiftKey ? "screensharing" : "video",
room_id: this.props.room.roomId,
});
// this._startCallApp(false);
} }
onVoiceCallClick(ev) { onVoiceCallClick(ev) {
this._startCallApp(true); // NOTE -- Will be replaced by Jitsi code (currently commented)
dis.dispatch({
action: 'place_call',
type: "voice",
room_id: this.props.room.roomId,
});
// this._startCallApp(true);
} }
onShowAppsClick(ev) { onShowAppsClick(ev) {