Update linting and fix PropTypes for FullView
parent
44058625b9
commit
67e2fc1c6f
|
|
@ -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,6 +91,7 @@ export default class FullView extends React.Component
|
|||
if (videoTrack)
|
||||
{
|
||||
const stream = new MediaStream;
|
||||
|
||||
stream.addTrack(videoTrack);
|
||||
video.srcObject = stream;
|
||||
}
|
||||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ class Peers extends React.Component
|
|||
|
||||
componentDidUpdate(prevProps)
|
||||
{
|
||||
if (prevProps.toolAreaOpen !== this.props.toolAreaOpen) {
|
||||
if (prevProps.toolAreaOpen !== this.props.toolAreaOpen)
|
||||
{
|
||||
this.updateDimensions();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue