2016-04-29 03:02:51 +08:00
|
|
|
import React, { Component, PropTypes } from 'react';
|
|
|
|
import { createContainer } from 'meteor/react-meteor-data';
|
2016-05-20 21:46:30 +08:00
|
|
|
import ActionsBar from './component';
|
2016-11-08 02:19:00 +08:00
|
|
|
import Service from './service';
|
2017-01-10 00:35:25 +08:00
|
|
|
import { joinListenOnly } from '/imports/api/phone';
|
2017-03-14 00:05:54 +08:00
|
|
|
import { exitAudio } from '/imports/api/phone';
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2016-05-04 22:48:53 +08:00
|
|
|
class ActionsBarContainer extends Component {
|
2016-04-29 03:02:51 +08:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2017-01-10 00:35:25 +08:00
|
|
|
const handleJoinListenOnly = () => joinListenOnly();
|
2017-03-14 00:05:54 +08:00
|
|
|
const handleExitAudio = () => exitAudio();
|
2017-01-10 00:35:25 +08:00
|
|
|
|
2016-04-29 03:02:51 +08:00
|
|
|
return (
|
2017-01-10 00:35:25 +08:00
|
|
|
<ActionsBar
|
|
|
|
handleJoinListenOnly={handleJoinListenOnly}
|
2017-03-14 00:05:54 +08:00
|
|
|
handleExitAudio={handleExitAudio}
|
|
|
|
{...this.props}>
|
2016-04-29 03:02:51 +08:00
|
|
|
{this.props.children}
|
2016-05-04 22:48:53 +08:00
|
|
|
</ActionsBar>
|
2016-04-29 03:02:51 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default createContainer(() => {
|
2016-11-08 02:19:00 +08:00
|
|
|
let data = Service.isUserPresenter();
|
2016-06-28 02:24:37 +08:00
|
|
|
return data;
|
2016-05-04 22:48:53 +08:00
|
|
|
}, ActionsBarContainer);
|