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

30 lines
727 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';
import { createContainer } from 'meteor/react-meteor-data';
2017-09-01 23:26:57 +08:00
2017-09-20 11:12:10 +08:00
const joinVideo = () => {
var joinVideoEvent = new Event('joinVideo');
document.dispatchEvent(joinVideoEvent);
}
const exitVideo = () => {
var exitVideoEvent = new Event('exitVideo');
document.dispatchEvent(exitVideoEvent);
}
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 = () => {
return 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
};