bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/video-dock/service.js

27 lines
660 B
JavaScript
Raw Normal View History

2017-09-19 21:53:27 +08:00
import { makeCall } from '/imports/ui/services/api';
import Users from '/imports/api/users';
2017-09-01 23:26:57 +08:00
2017-09-20 11:12:10 +08:00
const joinVideo = () => {
const joinVideoEvent = new Event('joinVideo');
2017-09-20 11:12:10 +08:00
document.dispatchEvent(joinVideoEvent);
};
2017-09-20 11:12:10 +08:00
const exitVideo = () => {
const exitVideoEvent = new Event('exitVideo');
2017-09-20 11:12:10 +08:00
document.dispatchEvent(exitVideoEvent);
};
2017-09-20 11:12:10 +08:00
2017-09-19 21:53:27 +08:00
const sendUserShareWebcam = (stream) => {
makeCall('userShareWebcam', stream);
2017-09-01 23:26:57 +08:00
};
2017-09-19 21:53:27 +08:00
const sendUserUnshareWebcam = (stream) => {
makeCall('userUnshareWebcam', stream);
2017-09-01 23:26:57 +08:00
};
const getAllUsers = () => Users.find().fetch();
2017-09-01 23:26:57 +08:00
export default {
sendUserShareWebcam, sendUserUnshareWebcam, joinVideo, exitVideo, getAllUsers,
2017-09-01 23:26:57 +08:00
};