From f49f02d0167d93f4aa3753b98a89bf796d12e88a Mon Sep 17 00:00:00 2001 From: Stefan Otto Date: Wed, 18 Jul 2018 15:21:19 +0200 Subject: [PATCH] fix: fullscreenbutton on screenshare --- app/lib/components/FullView.jsx | 8 ++++---- app/lib/components/Peer.jsx | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/lib/components/FullView.jsx b/app/lib/components/FullView.jsx index 28c1094..0011067 100644 --- a/app/lib/components/FullView.jsx +++ b/app/lib/components/FullView.jsx @@ -52,21 +52,21 @@ 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 = () => + handleExitFullscreen = () => { - if (!fscreen.fullscreenElement) + if (!fscreen.fullscreenElement) { this.props.toggleFullscreen(); } diff --git a/app/lib/components/Peer.jsx b/app/lib/components/Peer.jsx index 2b06f13..bf07925 100644 --- a/app/lib/components/Peer.jsx +++ b/app/lib/components/Peer.jsx @@ -147,7 +147,11 @@ class Peer extends Component {screenConsumer ?
-
+