commit
637ef19d8f
|
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ html {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#multiparty-meeting {
|
#multiparty-meeting {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue