|
|
@@ -21,6 +21,7 @@ import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks';
|
|
21
|
21
|
import { ConnectionIndicator } from '../../../connection-indicator';
|
|
22
|
22
|
import { DisplayNameLabel } from '../../../display-name';
|
|
23
|
23
|
import { RemoteVideoMenu } from '../../../remote-video-menu';
|
|
|
24
|
+import { toggleToolboxVisible } from '../../../toolbox';
|
|
24
|
25
|
|
|
25
|
26
|
import AudioMutedIndicator from './AudioMutedIndicator';
|
|
26
|
27
|
import DominantSpeakerIndicator from './DominantSpeakerIndicator';
|
|
|
@@ -74,12 +75,6 @@ type Props = {
|
|
74
|
75
|
*/
|
|
75
|
76
|
_videoTrack: Object,
|
|
76
|
77
|
|
|
77
|
|
- /**
|
|
78
|
|
- * If true, tapping on the thumbnail will not pin the participant to large
|
|
79
|
|
- * video. By default tapping does pin the participant.
|
|
80
|
|
- */
|
|
81
|
|
- disablePin?: boolean,
|
|
82
|
|
-
|
|
83
|
78
|
/**
|
|
84
|
79
|
* If true, there will be no color overlay (tint) on the thumbnail
|
|
85
|
80
|
* indicating the participant associated with the thumbnail is displayed on
|
|
|
@@ -105,7 +100,12 @@ type Props = {
|
|
105
|
100
|
/**
|
|
106
|
101
|
* Optional styling to add or override on the Thumbnail component root.
|
|
107
|
102
|
*/
|
|
108
|
|
- styleOverrides?: Object
|
|
|
103
|
+ styleOverrides?: Object,
|
|
|
104
|
+
|
|
|
105
|
+ /**
|
|
|
106
|
+ * If true, it tells the thumbnail that it needs to behave differently. E.g. react differently to a single tap.
|
|
|
107
|
+ */
|
|
|
108
|
+ tileView?: boolean
|
|
109
|
109
|
};
|
|
110
|
110
|
|
|
111
|
111
|
/**
|
|
|
@@ -130,10 +130,10 @@ class Thumbnail extends Component<Props> {
|
|
130
|
130
|
_onShowRemoteVideoMenu,
|
|
131
|
131
|
_styles,
|
|
132
|
132
|
_videoTrack: videoTrack,
|
|
133
|
|
- disablePin,
|
|
134
|
133
|
disableTint,
|
|
135
|
134
|
participant,
|
|
136
|
|
- renderDisplayName
|
|
|
135
|
+ renderDisplayName,
|
|
|
136
|
+ tileView
|
|
137
|
137
|
} = this.props;
|
|
138
|
138
|
|
|
139
|
139
|
// We don't render audio in any of the following:
|
|
|
@@ -152,13 +152,13 @@ class Thumbnail extends Component<Props> {
|
|
152
|
152
|
|
|
153
|
153
|
return (
|
|
154
|
154
|
<Container
|
|
155
|
|
- onClick = { disablePin ? undefined : _onClick }
|
|
|
155
|
+ onClick = { _onClick }
|
|
156
|
156
|
onLongPress = {
|
|
157
|
157
|
showRemoteVideoMenu
|
|
158
|
158
|
? _onShowRemoteVideoMenu : undefined }
|
|
159
|
159
|
style = { [
|
|
160
|
160
|
styles.thumbnail,
|
|
161
|
|
- participant.pinned && !disablePin
|
|
|
161
|
+ participant.pinned && !tileView
|
|
162
|
162
|
? _styles.thumbnailPinned : null,
|
|
163
|
163
|
this.props.styleOverrides || null
|
|
164
|
164
|
] }
|
|
|
@@ -234,10 +234,13 @@ function _mapDispatchToProps(dispatch: Function, ownProps): Object {
|
|
234
|
234
|
* @returns {void}
|
|
235
|
235
|
*/
|
|
236
|
236
|
_onClick() {
|
|
237
|
|
- const { participant } = ownProps;
|
|
|
237
|
+ const { participant, tileView } = ownProps;
|
|
238
|
238
|
|
|
239
|
|
- dispatch(
|
|
240
|
|
- pinParticipant(participant.pinned ? null : participant.id));
|
|
|
239
|
+ if (tileView) {
|
|
|
240
|
+ dispatch(toggleToolboxVisible());
|
|
|
241
|
+ } else {
|
|
|
242
|
+ dispatch(pinParticipant(participant.pinned ? null : participant.id));
|
|
|
243
|
+ }
|
|
241
|
244
|
},
|
|
242
|
245
|
|
|
243
|
246
|
/**
|