bigbluebutton-Github/bigbluebutton-html5/imports/api/video/server/modifiers/unsharedWebcam.js
prlanzarin 248dc7fa08 Fixed HTML5 video API import
Added chrome extension ID to HTML5 screenshare call
2017-11-17 18:55:59 +00:00

34 lines
684 B
JavaScript

import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
import { check } from 'meteor/check';
export default function unsharedWebcam(meetingId, userId) {
check(meetingId, String);
check(userId, String);
const selector = {
meetingId,
userId,
};
const modifier = {
$set: {
meetingId,
userId,
has_stream: false,
},
};
const cb = (err, numChanged) => {
if (err) {
return Logger.error(`Adding user to collection: ${err}`);
}
if (numChanged) {
return Logger.info(`Upserted user id=${userId} meeting=${meetingId}`);
}
};
return Users.upsert(selector, modifier, cb);
}