bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/deskshare/container.jsx

30 lines
686 B
React
Raw Normal View History

2016-05-07 04:15:47 +08:00
import React from 'react';
2017-03-22 05:46:41 +08:00
import {isVideoBroadcasting, presenterDeskshareHasEnded,
presenterDeskshareHasStarted} from './service';
2016-05-07 04:15:47 +08:00
import { createContainer } from 'meteor/react-meteor-data';
import DeskshareComponent from './component';
2016-05-07 04:15:47 +08:00
class DeskshareContainer extends React.Component {
render() {
2017-02-24 03:00:20 +08:00
if (this.props.isVideoBroadcasting()) {
return <DeskshareComponent {...this.props} />;
2016-05-07 04:15:47 +08:00
}
}
2016-09-15 04:25:31 +08:00
componentWillUnmount() {
2017-02-24 03:00:20 +08:00
this.props.presenterDeskshareHasEnded();
2016-09-15 04:25:31 +08:00
}
2016-05-07 04:15:47 +08:00
}
export default createContainer(() => {
2017-02-24 03:00:20 +08:00
const data = {
2017-02-24 03:05:53 +08:00
isVideoBroadcasting,
2017-02-24 03:00:20 +08:00
presenterDeskshareHasStarted,
presenterDeskshareHasEnded,
};
2016-05-07 04:15:47 +08:00
return data;
}, DeskshareContainer);
2017-03-22 05:46:41 +08:00