bigbluebutton-Github/bigbluebutton-html5/imports/api/video-streams/server/handlers/userUnsharedHtml5Webcam.js

17 lines
532 B
JavaScript
Raw Normal View History

import { check } from 'meteor/check';
2018-06-19 02:59:35 +08:00
import unsharedWebcam from '../modifiers/unsharedWebcam';
2019-11-23 05:08:27 +08:00
import { isValidStream } from '/imports/api/video-streams/server/helpers';
2017-09-01 23:26:57 +08:00
export default async function handleUserUnsharedHtml5Webcam({ header, body }, meetingId) {
const { userId, stream } = body;
check(header, Object);
2017-09-01 23:26:57 +08:00
check(meetingId, String);
check(userId, String);
check(stream, String);
if (!isValidStream(stream)) return false;
const result = await unsharedWebcam(meetingId, userId, stream);
return result;
2017-09-01 23:26:57 +08:00
}