Merge pull request #20 from matrix-org/screen-sharing

Screen sharing
pull/21833/head
Matthew Hodgson 2015-10-21 01:35:16 +01:00
commit feaf2a319b
3 changed files with 11 additions and 3 deletions

View File

@ -163,6 +163,12 @@ function _onAction(payload) {
payload.local_element
);
}
else if (payload.type === 'screensharing') {
newCall.placeScreenSharingCall(
payload.remote_element,
payload.local_element
);
}
else {
console.error("Unknown conf call type: %s", payload.type);
}

View File

@ -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
});
},

View File

@ -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";