Cleans up html5 screenshare

This commit is contained in:
perroned 2017-02-22 20:31:09 +00:00
parent 8106742d45
commit 2d04f057cc
5 changed files with 7 additions and 16 deletions

View File

@ -263,8 +263,8 @@ Verto.prototype.vmute = function () {
Verto.prototype.setWatchVideo = function (tag) {
this.mediaCallback = this.docall;
this.useVideo = true;
this.useCamera = 'any'; // temp
this.useMic = 'any'; // temp
this.useCamera = 'none';
this.useMic = 'none';
this.create(tag);
};

View File

@ -1,5 +1,5 @@
import RedisPubSub from '/imports/startup/server/redis';
import handleChatMessage from './handlers/incomingDeskshareEvent';
import incomingDeskshareEvent from './handlers/incomingDeskshareEvent';
RedisPubSub.on('desk_share_notify_viewers_rtmp', incomingDeskshareEvent);
RedisPubSub.on('desk_share_notify_a_single_viewer', incomingDeskshareEvent);

View File

@ -2,14 +2,10 @@ import Deskshare from '/imports/api/deskshare';
import Meetings from '/imports/api/meetings';
import modifyDeskshareStatus from '../modifiers/modifyDeskshareStatus';
export function handleIncomingDeskshareMessage(arg) {
console.log("Inside handleIncomingDeskshareMessage");
console.log(JSON.stringify(arg));
//console.log(`payload.voice_bridge: ${arg.payload.voice_bridge}`);
export default function incomingDeskshareEvent(arg) {
const payload = arg.payload;
const meetingId = payload.meeting_id;
const voiceBridge = Meetings.findOne({ meetingId: payload.meeting_id }).voiceConf;
console.log(`payload.meeting_id: ${payload.meeting_id}`);
const deskShareInfo = {
vw: payload.vw,

View File

@ -3,10 +3,9 @@ import Meetings from '/imports/api/meetings';
import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
export function modifyDeskshareStatus(meetingId, deskshareInfo) {
console.log("Inside handleDeskShareChange");
logger.info(`__${meetingId}__deskshareInfo= + ${JSON.stringify(deskshareInfo)}`);
export default function modifyDeskshareStatus(meetingId, deskshareInfo) {
const presenter = Users.findOne({ meetingId: meetingId, 'user.presenter': true }).user.userid;
Deskshare.upsert({ meetingId: meetingId }, { $set: {
broadcasting: deskshareInfo.broadcasting,
timestamp: 'now',

View File

@ -3,11 +3,7 @@ import '/imports/api/chat/server';
import '/imports/api/cursor/server';
import '/imports/api/deskshare/server/publications';
import '/imports/api/deskshare/server/modifiers/clearDeskshareCollection';
import '/imports/api/deskshare/server/modifiers/handleDeskShareChange';
import '/imports/api/deskshare/server/modifiers/handleIncomingDeskshareMessage';
import '/imports/api/deskshare/server/modifiers/eventHandlers';
import '/imports/api/deskshare/server';
import '/imports/api/meetings/server';