bigbluebutton-Github/bigbluebutton-html5/imports/api/external-videos/server/handlers/stopExternalVideo.js
2021-03-02 00:44:49 +00:00

19 lines
628 B
JavaScript

import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import Meetings from '/imports/api/meetings';
export default function handleStopExternalVideo({ header, body }, meetingId) {
const { userId } = header;
check(body, Object);
check(meetingId, String);
check(userId, String);
try {
Logger.info(`External video stop sharing was initiated by:[${userId}] for meeting ${meetingId}`);
Meetings.update({ meetingId }, { $set: { externalVideoUrl: null } });
} catch (err) {
Logger.error(`Error on setting shared external video stop in Meetings collection: ${err}`);
}
}