Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

pip: disable PiP on Android < 26

Saúl Ibarra Corretgéf9fcb46036ba
diff --git a/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js b/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
index 61a54dd60c..b00b655b1c 100644
--- a/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
+++ b/react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
@@ -1,5 +1,7 @@
// @flow
+import { Platform } from 'react-native';
+
import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconMenuDown } from '../../../base/icons';
@@ -62,8 +64,17 @@ class PictureInPictureButton extends AbstractButton<Props, *> {
* }}
*/
function _mapStateToProps(state): Object {
+ const flag = Boolean(getFeatureFlag(state, PIP_ENABLED));
+ let enabled = flag;
+
+ // Override flag for Android < 26, PiP was introduced in Oreo.
+ // https://developer.android.com/guide/topics/ui/picture-in-picture
+ if (Platform.OS === 'android' && Platform.Version < 26) {
+ enabled = false;
+ }
+
return {
- _enabled: Boolean(getFeatureFlag(state, PIP_ENABLED))
+ _enabled: enabled
};
}