From 9a99c517ab970aa500ce96be4e029ae04d1a7038 Mon Sep 17 00:00:00 2001 From: tmoldovan8x8 <62697631+tmoldovan8x8@users.noreply.github.com> Date: Thu, 23 Jun 2022 14:42:41 +0300 Subject: [PATCH] fix(rn, pip) enables PiP on conference mounted --- react/features/conference/components/native/Conference.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/react/features/conference/components/native/Conference.js b/react/features/conference/components/native/Conference.js index 99ed075cf..b5cfaf4b7 100644 --- a/react/features/conference/components/native/Conference.js +++ b/react/features/conference/components/native/Conference.js @@ -29,6 +29,7 @@ import { navigate } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef'; import { shouldEnableAutoKnock } from '../../../mobile/navigation/functions'; import { screen } from '../../../mobile/navigation/routes'; +import { setPictureInPictureEnabled } from '../../../mobile/picture-in-picture'; import { Captions } from '../../../subtitles'; import { setToolboxVisible } from '../../../toolbox/actions'; import { Toolbox } from '../../../toolbox/components/native'; @@ -191,6 +192,7 @@ class Conference extends AbstractConference { */ componentDidMount() { BackHandler.addEventListener('hardwareBackPress', this._onHardwareBackPress); + setPictureInPictureEnabled(true); } /** @@ -231,6 +233,7 @@ class Conference extends AbstractConference { BackHandler.removeEventListener('hardwareBackPress', this._onHardwareBackPress); clearTimeout(this._expandedLabelTimeout.current); + setPictureInPictureEnabled(false); } /**