|
@@ -1,6 +1,5 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
3
|
|
-import PropTypes from 'prop-types';
|
4
|
3
|
import React, { Component } from 'react';
|
5
|
4
|
import { ScrollView } from 'react-native';
|
6
|
5
|
import { connect } from 'react-redux';
|
|
@@ -15,35 +14,39 @@ import { styles } from './_';
|
15
|
14
|
import Thumbnail from './Thumbnail';
|
16
|
15
|
|
17
|
16
|
/**
|
18
|
|
- * Implements a React {@link Component} which represents the filmstrip on
|
19
|
|
- * mobile/React Native.
|
20
|
|
- *
|
21
|
|
- * @extends Component
|
|
17
|
+ * Filmstrip component's property types.
|
22
|
18
|
*/
|
23
|
|
-class Filmstrip extends Component<*> {
|
|
19
|
+type Props = {
|
|
20
|
+
|
24
|
21
|
/**
|
25
|
|
- * Filmstrip component's property types.
|
|
22
|
+ * The indicator which determines whether the filmstrip is enabled.
|
26
|
23
|
*
|
27
|
|
- * @static
|
|
24
|
+ * @private
|
28
|
25
|
*/
|
29
|
|
- static propTypes = {
|
30
|
|
- /**
|
31
|
|
- * The participants in the conference.
|
32
|
|
- *
|
33
|
|
- * @private
|
34
|
|
- * @type {Participant[]}
|
35
|
|
- */
|
36
|
|
- _participants: PropTypes.array,
|
|
26
|
+ _enabled: boolean,
|
37
|
27
|
|
38
|
|
- /**
|
39
|
|
- * The indicator which determines whether the filmstrip is visible.
|
40
|
|
- *
|
41
|
|
- * @private
|
42
|
|
- * @type {boolean}
|
43
|
|
- */
|
44
|
|
- _visible: PropTypes.bool.isRequired
|
45
|
|
- };
|
|
28
|
+ /**
|
|
29
|
+ * The participants in the conference.
|
|
30
|
+ *
|
|
31
|
+ * @private
|
|
32
|
+ */
|
|
33
|
+ _participants: Array<any>,
|
|
34
|
+
|
|
35
|
+ /**
|
|
36
|
+ * The indicator which determines whether the filmstrip is visible.
|
|
37
|
+ *
|
|
38
|
+ * @private
|
|
39
|
+ */
|
|
40
|
+ _visible: boolean
|
|
41
|
+};
|
46
|
42
|
|
|
43
|
+/**
|
|
44
|
+ * Implements a React {@link Component} which represents the filmstrip on
|
|
45
|
+ * mobile/React Native.
|
|
46
|
+ *
|
|
47
|
+ * @extends Component
|
|
48
|
+ */
|
|
49
|
+class Filmstrip extends Component<Props> {
|
47
|
50
|
/**
|
48
|
51
|
* Implements React's {@link Component#render()}.
|
49
|
52
|
*
|
|
@@ -51,6 +54,10 @@ class Filmstrip extends Component<*> {
|
51
|
54
|
* @returns {ReactElement}
|
52
|
55
|
*/
|
53
|
56
|
render() {
|
|
57
|
+ if (!this.props._enabled) {
|
|
58
|
+ return null;
|
|
59
|
+ }
|
|
60
|
+
|
54
|
61
|
const isNarrowAspectRatio_ = isNarrowAspectRatio(this);
|
55
|
62
|
const filmstripStyle
|
56
|
63
|
= isNarrowAspectRatio_
|
|
@@ -131,9 +138,17 @@ class Filmstrip extends Component<*> {
|
131
|
138
|
*/
|
132
|
139
|
function _mapStateToProps(state) {
|
133
|
140
|
const participants = state['features/base/participants'];
|
134
|
|
- const { visible } = state['features/filmstrip'];
|
|
141
|
+ const { enabled, visible } = state['features/filmstrip'];
|
135
|
142
|
|
136
|
143
|
return {
|
|
144
|
+ /**
|
|
145
|
+ * The indicator which determines whether the filmstrip is enabled.
|
|
146
|
+ *
|
|
147
|
+ * @private
|
|
148
|
+ * @type {boolean}
|
|
149
|
+ */
|
|
150
|
+ _enabled: enabled,
|
|
151
|
+
|
137
|
152
|
/**
|
138
|
153
|
* The participants in the conference.
|
139
|
154
|
*
|