From 1f1352786f193ec5761f90f8bbd43ae7eb7816e7 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 27 Jun 2017 11:38:14 +0100 Subject: [PATCH] Temporarily disable Jitsi default --- src/components/views/rooms/MessageComposer.js | 70 +++++++++++-------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 8d9feccf7e..63c7f8c00a 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -152,41 +152,53 @@ export default class MessageComposer extends React.Component { }); } - _startCallApp(isAudioConf) { - dis.dispatch({ - action: 'appsDrawer', - show: true, - }); + // _startCallApp(isAudioConf) { + // dis.dispatch({ + // action: 'appsDrawer', + // show: true, + // }); - const appsStateEvents = this.props.room.currentState.getStateEvents('im.vector.modular.widgets', ''); - let appsStateEvent = {}; - if (appsStateEvents) { - appsStateEvent = appsStateEvents.getContent(); - } - if (!appsStateEvent.videoConf) { - appsStateEvent.videoConf = { - type: 'jitsi', - url: 'http://localhost:8000/jitsi.html', - data: { - confId: this.props.room.roomId.replace(/[^A-Za-z0-9]/g, '_') + Date.now(), - isAudioConf: isAudioConf, - }, - }; - MatrixClientPeg.get().sendStateEvent( - this.props.room.roomId, - 'im.vector.modular.widgets', - appsStateEvent, - '', - ).then(() => console.log('Sent state'), (e) => console.error(e)); - } - } + // const appsStateEvents = this.props.room.currentState.getStateEvents('im.vector.modular.widgets', ''); + // let appsStateEvent = {}; + // if (appsStateEvents) { + // appsStateEvent = appsStateEvents.getContent(); + // } + // if (!appsStateEvent.videoConf) { + // appsStateEvent.videoConf = { + // type: 'jitsi', + // url: 'http://localhost:8000/jitsi.html', + // data: { + // confId: this.props.room.roomId.replace(/[^A-Za-z0-9]/g, '_') + Date.now(), + // isAudioConf: isAudioConf, + // }, + // }; + // MatrixClientPeg.get().sendStateEvent( + // this.props.room.roomId, + // 'im.vector.modular.widgets', + // appsStateEvent, + // '', + // ).then(() => console.log('Sent state'), (e) => console.error(e)); + // } + // } 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) { - 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) {