2017-09-19 21:53:27 +08:00
|
|
|
import { makeCall } from '/imports/ui/services/api';
|
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
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
2017-09-20 11:12:10 +08:00
|
|
|
sendUserShareWebcam, sendUserUnshareWebcam, joinVideo, exitVideo,
|
2017-09-01 23:26:57 +08:00
|
|
|
};
|