Sfoglia il codice sorgente

pip: disable PiP on Android < 26

Fixes: https://github.com/jitsi/jitsi-meet/issues/6008
efficient_tiling
Saúl Ibarra Corretgé 5 anni fa
parent
commit
f9fcb46036

+ 12
- 1
react/features/mobile/picture-in-picture/components/PictureInPictureButton.js Vedi File

1
 // @flow
1
 // @flow
2
 
2
 
3
+import { Platform } from 'react-native';
4
+
3
 import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags';
5
 import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags';
4
 import { translate } from '../../../base/i18n';
6
 import { translate } from '../../../base/i18n';
5
 import { IconMenuDown } from '../../../base/icons';
7
 import { IconMenuDown } from '../../../base/icons';
62
  * }}
64
  * }}
63
  */
65
  */
64
 function _mapStateToProps(state): Object {
66
 function _mapStateToProps(state): Object {
67
+    const flag = Boolean(getFeatureFlag(state, PIP_ENABLED));
68
+    let enabled = flag;
69
+
70
+    // Override flag for Android < 26, PiP was introduced in Oreo.
71
+    // https://developer.android.com/guide/topics/ui/picture-in-picture
72
+    if (Platform.OS === 'android' && Platform.Version < 26) {
73
+        enabled = false;
74
+    }
75
+
65
     return {
76
     return {
66
-        _enabled: Boolean(getFeatureFlag(state, PIP_ENABLED))
77
+        _enabled: enabled
67
     };
78
     };
68
 }
79
 }
69
 
80
 

Loading…
Annulla
Salva