bigbluebutton-Github/bigbluebutton-html5/imports/api/2.0/screenshare/client/bridge/kurento.js

50 lines
964 B
JavaScript
Raw Normal View History

import Users from '/imports/api/2.0/users';
import Auth from '/imports/ui/services/auth';
import BridgeService from './service';
const getUserId = () => {
const userID = Auth.userID;
return userID;
}
const getMeetingId = () => {
const meetingID = Auth.meetingID;
return meetingID;
}
const getUsername = () => {
return Users.findOne({ userId: getUserId() }).name;
}
export default class KurentoScreenshareBridge {
kurentoWatchVideo() {
window.kurentoWatchVideo(
'screenshareVideo',
BridgeService.getConferenceBridge(),
getUsername(),
getMeetingId(),
null,
null,
);
}
kurentoExitVideo() {
window.kurentoExitVideo();
}
2017-09-13 04:47:06 +08:00
kurentoShareScreen() {
window.kurentoShareScreen(
'screenshareVideo',
2017-09-13 04:47:06 +08:00
BridgeService.getConferenceBridge(),
getUsername(),
2017-09-13 04:47:06 +08:00
getMeetingId(),
null,
null,
);
}
kurentoExitScreenShare() {
window.kurentoExitScreenShare();
}
}