From 8ff7d87b380a21326180b428662f05336f0895a3 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 20 Oct 2015 16:45:26 +0100 Subject: [PATCH 1/3] Bodge to make video = screen sharing --- src/CallHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CallHandler.js b/src/CallHandler.js index d0cf16f801..0a7a1cf922 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -158,7 +158,7 @@ function _onAction(payload) { newCall.placeVoiceCall(); } else if (payload.type === 'video') { - newCall.placeVideoCall( + newCall.placeScreenSharingCall( payload.remote_element, payload.local_element ); From 98ea35253a5bd8769b3623c8e9cf4b2c6c7b2174 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 21 Oct 2015 01:21:21 +0100 Subject: [PATCH 2/3] shift-click the video button to screenshare rather than overriding the button entirely. --- src/CallHandler.js | 6 ++++++ src/controllers/molecules/RoomHeader.js | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/CallHandler.js b/src/CallHandler.js index 0a7a1cf922..cf8460db6c 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -158,6 +158,12 @@ function _onAction(payload) { newCall.placeVoiceCall(); } else if (payload.type === 'video') { + newCall.placeVideoCall( + payload.remote_element, + payload.local_element + ); + } + else if (payload.type === 'screensharing') { newCall.placeScreenSharingCall( payload.remote_element, payload.local_element diff --git a/src/controllers/molecules/RoomHeader.js b/src/controllers/molecules/RoomHeader.js index d16e3cbd42..b0bf0002da 100644 --- a/src/controllers/molecules/RoomHeader.js +++ b/src/controllers/molecules/RoomHeader.js @@ -69,10 +69,10 @@ module.exports = { }); }, - onVideoClick: function() { + onVideoClick: function(e) { dis.dispatch({ action: 'place_call', - type: "video", + type: e.shiftKey ? "screensharing" : "video", room_id: this.props.room.roomId }); }, From 3b988b0eac261f178108887efcc4b4599346f18d Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 21 Oct 2015 01:21:39 +0100 Subject: [PATCH 3/3] set up remoteAudioElement --- src/controllers/molecules/voip/CallView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/molecules/voip/CallView.js b/src/controllers/molecules/voip/CallView.js index c8fab1fba4..4dd488c2dc 100644 --- a/src/controllers/molecules/voip/CallView.js +++ b/src/controllers/molecules/voip/CallView.js @@ -54,8 +54,10 @@ module.exports = { var call = CallHandler.getCall(roomId); if (call) { call.setLocalVideoElement(this.getVideoView().getLocalVideoElement()); - // N.B. the remote video element is used for playback for audio for voice calls call.setRemoteVideoElement(this.getVideoView().getRemoteVideoElement()); + // give a separate element for audio stream playback - both for voice calls + // and for the voice stream of screen captures + call.setRemoteAudioElement(this.getVideoView().getRemoteAudioElement()); } if (call && call.type === "video" && call.state !== 'ended') { this.getVideoView().getLocalVideoElement().style.display = "initial";