bigbluebutton-Github/bigbluebutton-html5/imports/api/audio/client/bridge/verto.js

32 lines
612 B
JavaScript
Raw Normal View History

2017-07-24 22:15:46 +08:00
import BaseAudioBridge from './base';
export default class VertoBridge extends BaseAudioBridge {
constructor(userData) {
super();
const {
userId,
username,
voiceBridge,
} = userData;
this.voiceBridge = voiceBridge;
this.vertoUsername = `${userId}-bbbID-${username}`;
}
exitAudio(listenOnly) {
window.vertoExitAudio();
}
2017-10-12 23:04:34 +08:00
joinAudio({ isListenOnly }) {
const vertoJoin = isListenOnly ? 'vertoJoinListenOnly' : 'vertoJoinMicrophone';
2017-07-24 22:15:46 +08:00
2017-10-12 23:04:34 +08:00
window[vertoJoin](
2017-07-24 22:15:46 +08:00
'remote-media',
this.voiceBridge,
this.vertoUsername,
null,
);
}
}