bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/service.js

28 lines
759 B
JavaScript
Raw Normal View History

2017-03-28 04:40:44 +08:00
import React from 'react';
2017-03-28 22:02:23 +08:00
import AudioModal from './audio-modal/component';
import Meetings from '/imports/api/meetings';
import { showModal } from '/imports/ui/components/app/service';
2017-03-31 23:46:33 +08:00
import AudioManager from '/imports/api/audio/client/bridge'
2017-03-28 22:02:23 +08:00
const handleJoinAudio = () => {
const handleJoinListenOnly = () => joinListenOnly();
return showModal(<AudioModal handleJoinListenOnly={handleJoinListenOnly} />);
};
const getVoiceBridge = () => {
2017-03-28 22:02:23 +08:00
return Meetings.findOne({}).voiceConf;
} ;
2017-03-28 22:02:23 +08:00
2017-03-31 23:46:33 +08:00
let exitAudio = () => AudioManager.exitAudio();
let joinListenOnly = () => AudioManager.joinAudio(true);
let joinMicrophone = () => AudioManager.joinAudio(false);
2017-03-31 01:57:05 +08:00
2017-03-28 22:02:23 +08:00
export {
handleJoinAudio,
getVoiceBridge,
exitAudio,
joinListenOnly,
joinMicrophone,
2017-03-28 04:40:44 +08:00
};