Merge pull request #16 from torjusti/fix/notifications-scrollbar

Fix notifications scrollbar
master
Stefan Otto 2018-07-17 09:05:23 +02:00 committed by GitHub
commit 637ef19d8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 16 deletions

View File

@ -52,18 +52,22 @@ export default class FullView extends React.Component
this._setTracks(videoTrack); this._setTracks(videoTrack);
if (fscreen.fullscreenEnabled) { if (fscreen.fullscreenEnabled)
{
fscreen.addEventListener('fullscreenchange', this.handleExitFullscreen, false); fscreen.addEventListener('fullscreenchange', this.handleExitFullscreen, false);
fscreen.requestFullscreen(this.video.current); fscreen.requestFullscreen(this.video.current);
} }
} }
componentWillUnmount() { componentWillUnmount()
{
fscreen.removeEventListener('fullscreenchange', this.handleExitFullscreen); fscreen.removeEventListener('fullscreenchange', this.handleExitFullscreen);
} }
handleExitFullscreen = () => { handleExitFullscreen = () =>
if (!fscreen.fullscreenElement) { {
if (!fscreen.fullscreenElement)
{
this.props.toggleFullscreen(); this.props.toggleFullscreen();
} }
}; };
@ -87,7 +91,8 @@ export default class FullView extends React.Component
if (videoTrack) if (videoTrack)
{ {
const stream = new MediaStream; const stream = new MediaStream;
stream.addTrack(videoTrack);
stream.addTrack(videoTrack);
video.srcObject = stream; video.srcObject = stream;
} }
else else
@ -99,7 +104,8 @@ export default class FullView extends React.Component
FullView.propTypes = FullView.propTypes =
{ {
videoTrack : PropTypes.any, videoTrack : PropTypes.any,
videoVisible : PropTypes.bool, videoVisible : PropTypes.bool,
videoProfile : PropTypes.string videoProfile : PropTypes.string,
toggleFullscreen : PropTypes.func.isRequired
}; };

View File

@ -25,12 +25,7 @@ class Peers extends React.Component
updateDimensions() updateDimensions()
{ {
const n = this.props.videoStreams ? this.props.videoStreams : 0; const n = this.props.peers.length;
if (n == 0)
{
return;
}
const width = this.refs.peers.clientWidth; const width = this.refs.peers.clientWidth;
const height = this.refs.peers.clientHeight; const height = this.refs.peers.clientHeight;
@ -72,9 +67,12 @@ class Peers extends React.Component
window.removeEventListener('resize', this.resizeUpdate.bind(this)); window.removeEventListener('resize', this.resizeUpdate.bind(this));
} }
componentDidUpdate() componentDidUpdate(prevProps)
{ {
this.updateDimensions(); if (prevProps.toolAreaOpen !== this.props.toolAreaOpen)
{
this.updateDimensions();
}
} }
render() render()

View File

@ -29,6 +29,7 @@ html {
body { body {
height: 100%; height: 100%;
overflow-x: hidden;
} }
#multiparty-meeting { #multiparty-meeting {