2017-10-12 10:00:28 +08:00
|
|
|
import RedisPubSub from '/imports/startup/server/redis';
|
2017-10-11 02:30:45 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
|
2019-11-14 00:53:45 +08:00
|
|
|
import { removeAnnotationsStreamer } from '/imports/api/annotations/server/streamer';
|
|
|
|
import { removeCursorStreamer } from '/imports/api/cursor/server/streamer';
|
2020-08-28 18:58:55 +08:00
|
|
|
import { removeExternalVideoStreamer } from '/imports/api/external-videos/server/streamer';
|
2019-10-24 03:20:52 +08:00
|
|
|
|
2018-02-08 06:57:34 +08:00
|
|
|
export default function handleMeetingDestruction({ body }) {
|
|
|
|
check(body, Object);
|
|
|
|
const { meetingId } = body;
|
2017-10-11 02:30:45 +08:00
|
|
|
check(meetingId, String);
|
|
|
|
|
2021-02-16 11:19:31 +08:00
|
|
|
if (!process.env.BBB_HTML5_ROLE || process.env.BBB_HTML5_ROLE === 'frontend') {
|
2021-02-06 01:47:46 +08:00
|
|
|
removeAnnotationsStreamer(meetingId);
|
|
|
|
removeCursorStreamer(meetingId);
|
2020-08-28 18:58:55 +08:00
|
|
|
removeExternalVideoStreamer(meetingId);
|
2021-02-06 01:47:46 +08:00
|
|
|
}
|
2019-10-24 03:20:52 +08:00
|
|
|
|
2017-10-11 02:30:45 +08:00
|
|
|
return RedisPubSub.destroyMeetingQueue(meetingId);
|
|
|
|
}
|