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

27 lines
673 B
React
Raw Normal View History

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { isVideoBroadcasting, presenterScreenshareHasEnded,
presenterScreenshareHasStarted } from './service';
import ScreenshareComponent from './component';
class ScreenshareContainer extends React.Component {
componentWillUnmount() {
this.props.presenterScreenshareHasEnded();
}
render() {
if (this.props.isVideoBroadcasting()) {
return <ScreenshareComponent {...this.props} />;
}
return null;
}
}
export default withTracker(() => ({
isVideoBroadcasting,
presenterScreenshareHasStarted,
presenterScreenshareHasEnded,
}))(ScreenshareContainer);