2017-09-09 01:00:00 +08:00
|
|
|
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(),
|
2017-11-06 23:39:55 +08:00
|
|
|
getUsername(),
|
2017-09-09 01:00:00 +08:00
|
|
|
getMeetingId(),
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
kurentoExitVideo() {
|
|
|
|
window.kurentoExitVideo();
|
|
|
|
}
|
2017-09-13 04:47:06 +08:00
|
|
|
|
|
|
|
kurentoShareScreen() {
|
|
|
|
window.kurentoShareScreen(
|
2017-11-06 23:39:55 +08:00
|
|
|
'screenshareVideo',
|
2017-09-13 04:47:06 +08:00
|
|
|
BridgeService.getConferenceBridge(),
|
2017-11-06 23:39:55 +08:00
|
|
|
getUsername(),
|
2017-09-13 04:47:06 +08:00
|
|
|
getMeetingId(),
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
);
|
|
|
|
}
|
2017-11-06 23:39:55 +08:00
|
|
|
|
|
|
|
kurentoExitScreenShare() {
|
|
|
|
window.kurentoExitScreenShare();
|
|
|
|
}
|
2017-09-09 01:00:00 +08:00
|
|
|
}
|