|
@@ -1,5 +1,9 @@
|
1
|
1
|
/* @flow */
|
2
|
2
|
|
|
3
|
+import { Platform } from '../react';
|
|
4
|
+
|
|
5
|
+import { ColorPalette } from './components';
|
|
6
|
+
|
3
|
7
|
declare type StyleSheet = Object;
|
4
|
8
|
|
5
|
9
|
/**
|
|
@@ -39,6 +43,25 @@ export function createStyleSheet(styles: StyleSheet, overrides: StyleSheet = {})
|
39
|
43
|
return combinedStyles;
|
40
|
44
|
}
|
41
|
45
|
|
|
46
|
+/**
|
|
47
|
+ * Works around a bug in react-native or react-native-webrtc on Android which
|
|
48
|
+ * causes Views overlaying RTCView to be clipped. Even though we (may) display
|
|
49
|
+ * multiple RTCViews, it is enough to apply the fix only to a View with a
|
|
50
|
+ * bounding rectangle containing all RTCviews and their overlaying Views.
|
|
51
|
+ *
|
|
52
|
+ * @param {StyleSheet} styles - An object which represents a stylesheet.
|
|
53
|
+ * @public
|
|
54
|
+ * @returns {StyleSheet}
|
|
55
|
+ */
|
|
56
|
+export function fixAndroidViewClipping<T: StyleSheet>(styles: T): T {
|
|
57
|
+ if (Platform.OS === 'android') {
|
|
58
|
+ styles.borderColor = ColorPalette.appBackground;
|
|
59
|
+ styles.borderWidth = 0.2;
|
|
60
|
+ }
|
|
61
|
+
|
|
62
|
+ return styles;
|
|
63
|
+}
|
|
64
|
+
|
42
|
65
|
/**
|
43
|
66
|
* Shims style properties to work correctly on native. Allows us to minimize the
|
44
|
67
|
* number of style declarations that need to be set or overridden for specific
|