bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/screenshare/component.jsx
2018-03-14 15:28:28 -03:00

22 lines
540 B
JavaScript
Executable File

import React from 'react';
export default class ScreenshareComponent extends React.Component {
componentDidMount() {
this.props.presenterScreenshareHasStarted();
}
componentWillReceiveProps(nextProps) {
if (this.props.isPresenter && !nextProps.isPresenter) {
this.props.unshareScreen();
}
}
componentWillUnmount() {
this.props.presenterScreenshareHasEnded();
}
render() {
return (
<video id="screenshareVideo" style={{ maxHeight: '100%', width: '100%' }} autoPlay playsInline />
);
}
}