diff --git a/app/lib/components/FullView.jsx b/app/lib/components/FullView.jsx index 5ea6cad..c692850 100644 --- a/app/lib/components/FullView.jsx +++ b/app/lib/components/FullView.jsx @@ -52,18 +52,22 @@ export default class FullView extends React.Component this._setTracks(videoTrack); - if (fscreen.fullscreenEnabled) { + if (fscreen.fullscreenEnabled) + { fscreen.addEventListener('fullscreenchange', this.handleExitFullscreen, false); fscreen.requestFullscreen(this.video.current); } } - componentWillUnmount() { + componentWillUnmount() + { fscreen.removeEventListener('fullscreenchange', this.handleExitFullscreen); } - handleExitFullscreen = () => { - if (!fscreen.fullscreenElement) { + handleExitFullscreen = () => + { + if (!fscreen.fullscreenElement) + { this.props.toggleFullscreen(); } }; @@ -87,7 +91,8 @@ export default class FullView extends React.Component if (videoTrack) { const stream = new MediaStream; - stream.addTrack(videoTrack); + + stream.addTrack(videoTrack); video.srcObject = stream; } else @@ -99,7 +104,8 @@ export default class FullView extends React.Component FullView.propTypes = { - videoTrack : PropTypes.any, - videoVisible : PropTypes.bool, - videoProfile : PropTypes.string + videoTrack : PropTypes.any, + videoVisible : PropTypes.bool, + videoProfile : PropTypes.string, + toggleFullscreen : PropTypes.func.isRequired }; diff --git a/app/lib/components/Peers.jsx b/app/lib/components/Peers.jsx index 02bed23..e8ead9d 100644 --- a/app/lib/components/Peers.jsx +++ b/app/lib/components/Peers.jsx @@ -25,12 +25,7 @@ class Peers extends React.Component updateDimensions() { - const n = this.props.videoStreams ? this.props.videoStreams : 0; - - if (n == 0) - { - return; - } + const n = this.props.peers.length; const width = this.refs.peers.clientWidth; const height = this.refs.peers.clientHeight; @@ -72,9 +67,12 @@ class Peers extends React.Component window.removeEventListener('resize', this.resizeUpdate.bind(this)); } - componentDidUpdate() + componentDidUpdate(prevProps) { - this.updateDimensions(); + if (prevProps.toolAreaOpen !== this.props.toolAreaOpen) + { + this.updateDimensions(); + } } render() diff --git a/app/stylus/index.styl b/app/stylus/index.styl index a8a7c9b..a9a58f8 100644 --- a/app/stylus/index.styl +++ b/app/stylus/index.styl @@ -29,6 +29,7 @@ html { body { height: 100%; + overflow-x: hidden; } #multiparty-meeting {