bigbluebutton-Github/bigbluebutton-html5/imports/api/1.1/deskshare/client/bridge/verto.js
2017-06-19 08:57:32 -03:00

33 lines
734 B
JavaScript

import Users from '/imports/api/1.1/users';
import Auth from '/imports/ui/services/auth';
import { getConferenceBridge } from './service';
// TODO pass info in constructor instead of importing ^^
const createVertoUserName = () => {
const userId = Auth.userID;
const uName = Users.findOne({ userId }).user.name;
return `FreeSWITCH User - ${encodeURIComponent(uName)}`;
};
export default class VertoDeskshareBridge {
constructor() {
this.data = { getConferenceBridge };
}
vertoWatchVideo() {
window.vertoWatchVideo(
'deskshareVideo',
this.data.getConferenceBridge(),
createVertoUserName(),
null,
null,
null,
);
}
vertoExitVideo() {
window.vertoExitVideo();
}
}