|
@@ -31,9 +31,9 @@ const _INTERCEPT_COMPONENT_RULES = [
|
31
|
31
|
|
32
|
32
|
/**
|
33
|
33
|
* This rule describes case when user opens application using mobile
|
34
|
|
- * browser. In order to promote the app, we choose to suggest the mobile
|
35
|
|
- * app even if the browser supports the app (e.g. Google Chrome with
|
36
|
|
- * WebRTC support on Android).
|
|
34
|
+ * browser and is attempting to join a conference. In order to promote the
|
|
35
|
+ * app, we choose to suggest the mobile app even if the browser supports the
|
|
36
|
+ * app (e.g. Google Chrome with WebRTC support on Android).
|
37
|
37
|
*
|
38
|
38
|
* @param {Object} state - The redux state of the app.
|
39
|
39
|
* @returns {UnsupportedMobileBrowser|void} If the rule is satisfied then
|
|
@@ -42,8 +42,15 @@ const _INTERCEPT_COMPONENT_RULES = [
|
42
|
42
|
// eslint-disable-next-line no-unused-vars
|
43
|
43
|
state => {
|
44
|
44
|
const OS = Platform.OS;
|
45
|
|
-
|
46
|
|
- if (OS === 'android' || OS === 'ios') {
|
|
45
|
+ const { room } = state['features/base/conference'];
|
|
46
|
+ const isUsingMobileBrowser = OS === 'android' || OS === 'ios';
|
|
47
|
+
|
|
48
|
+ /**
|
|
49
|
+ * Checking for presence of a room is done so that interception only
|
|
50
|
+ * occurs when trying to enter a meeting but pages outside of meeting,
|
|
51
|
+ * like WelcomePage, can still display.
|
|
52
|
+ */
|
|
53
|
+ if (room && isUsingMobileBrowser) {
|
47
|
54
|
const mobileAppPromo
|
48
|
55
|
= typeof interfaceConfig === 'object'
|
49
|
56
|
&& interfaceConfig.MOBILE_APP_PROMO;
|