Merge branch 'merge-webrtc-screenshare-2' of https://github.com/perroned/bigbluebutton into perroned-merge-webrtc-screenshare-2

This commit is contained in:
Ubuntu 2017-03-22 20:37:41 +00:00
commit a096e25a72
7 changed files with 29 additions and 20 deletions

View File

@ -368,6 +368,10 @@ Verto.prototype.makeShare = function () {
};
Verto.prototype.doShare = function (screenConstraints) {
screenConstraints.maxWidth = this.vid_width;
screenConstraints.maxHeight = this.vid_height;
this.share_call = window.vertoHandle.newCall({
destination_number: this.destination_number,
caller_id_name: this.caller_id_name,

View File

@ -1,11 +1,17 @@
import Deskshare from '/imports/api/deskshare';
import Meetings from '/imports/api/meetings';
import modifyDeskshareStatus from '../modifiers/modifyDeskshareStatus';
import { check } from 'meteor/check';
export default function incomingDeskshareEvent({ payload }) {
check(payload, Object);
check(payload.meeting_id, String);
check(payload.broadcasting, Boolean);
check(payload.vh, Number);
check(payload.vw, Number);
export default function incomingDeskshareEvent(arg) {
const payload = arg.payload;
const meetingId = payload.meeting_id;
const voiceBridge = Meetings.findOne({ meetingId: payload.meeting_id }).voiceConf;
const voiceBridge = Meetings.findOne({ meetingId }).voiceConf;
const deskShareInfo = {
vw: payload.vw,
@ -15,3 +21,4 @@ export default function incomingDeskshareEvent(arg) {
};
modifyDeskshareStatus(meetingId, deskShareInfo);
}

View File

@ -3,17 +3,14 @@ import Meetings from '/imports/api/meetings';
import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
import { check } from 'meteor/check';
export default function modifyDeskshareStatus(meetingId, deskshareInfo) {
const presenter = Users.findOne({ meetingId: meetingId, 'user.presenter': true });
let startedById = null;
if (Match.test(presenter, Object) && Match.test(presenter.user.userid, String)) {
startedById = presenter.user.userid;
} else {
throw new Meteor.Error('not-allowed', `Deskshare presenter does not exist in this meeting`);
}
check(meetingId, String);
const presenter = Users.findOne({ meetingId, 'user.presenter': true });
check(presenter, Object);
check(presenter.user.userid, String);
const startedById = presenter.user.userid;
Deskshare.upsert({ meetingId: meetingId }, { $set: {
broadcasting: deskshareInfo.broadcasting,

View File

@ -1,5 +1,6 @@
import React from 'react';
import {isVideoBroadcasting, presenterDeskshareHasEnded, presenterDeskshareHasStarted} from './service';
import {isVideoBroadcasting, presenterDeskshareHasEnded,
presenterDeskshareHasStarted} from './service';
import { createContainer } from 'meteor/react-meteor-data';
import DeskshareComponent from './component';
@ -7,8 +8,6 @@ class DeskshareContainer extends React.Component {
render() {
if (this.props.isVideoBroadcasting()) {
return <DeskshareComponent {...this.props} />;
} else {
return null;
}
}
@ -27,3 +26,4 @@ export default createContainer(() => {
return data;
}, DeskshareContainer);

View File

@ -18,14 +18,14 @@ function isVideoBroadcasting() {
function presenterDeskshareHasEnded() {
// references a functiion in the global namespace inside verto_extension.js
// that we load dynamically
window.vertoExitVideo();
vertoExitVideo();
};
// if remote deskshare has been started connect and display the video stream
function presenterDeskshareHasStarted() {
// references a functiion in the global namespace inside verto_extension.js
// that we load dynamically
window.vertoWatchVideo();
vertoWatchVideo();
};
export {

View File

@ -57,6 +57,8 @@ export default createContainer(() => {
let data = {};
data.currentPresentation = MediaService.getPresentationInfo();
data.content = <DefaultContent />;
if (MediaService.shouldShowWhiteboard()) {
data.content = <PresentationAreaContainer />;
}
@ -69,6 +71,5 @@ export default createContainer(() => {
data.overlay = <VideoDockContainer />;
}
return data;
}, MediaContainer);

View File

@ -1,6 +1,6 @@
import Presentations from '/imports/api/presentations';
import Slides from '/imports/api/slides';
import {isVideoBroadcasting} from '../deskshare/service';
import { isVideoBroadcasting } from '../deskshare/service';
let getPresentationInfo = () => {
let currentPresentation;
@ -23,9 +23,9 @@ function shouldShowDeskshare() {
}
function shouldShowOverlay() {
return false;
}
export default {
getPresentationInfo,
shouldShowWhiteboard,