bigbluebutton-Github/bigbluebutton-html5/imports/api/video-streams/server/publisher.js
2019-09-06 13:50:31 -03:00

28 lines
696 B
JavaScript

import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import VideoStreams from '/imports/api/video-streams';
function videoStreams(credentials) {
const { meetingId, requesterUserId, requesterToken } = credentials;
check(meetingId, String);
check(requesterUserId, String);
check(requesterToken, String);
Logger.debug(`video users of meeting id=${meetingId}`);
const selector = {
meetingId,
};
return VideoStreams.find(selector);
}
function publish(...args) {
const boundVideoStreams = videoStreams.bind(this);
return boundVideoStreams(...args);
}
Meteor.publish('video-streams', publish);