|
@@ -2,10 +2,10 @@
|
2
|
2
|
|
3
|
3
|
import React, { Component } from 'react';
|
4
|
4
|
|
5
|
|
-import { isMobileBrowser } from '../../../../../react/features/base/environment/utils';
|
6
|
5
|
import { createScreenSharingIssueEvent, sendAnalytics } from '../../../analytics';
|
7
|
6
|
import { AudioLevelIndicator } from '../../../audio-level-indicator';
|
8
|
7
|
import { Avatar } from '../../../base/avatar';
|
|
8
|
+import { isMobileBrowser } from '../../../base/environment/utils';
|
9
|
9
|
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
|
10
|
10
|
import { MEDIA_TYPE, VideoTrack } from '../../../base/media';
|
11
|
11
|
import {
|
|
@@ -139,6 +139,11 @@ export type Props = {|
|
139
|
139
|
*/
|
140
|
140
|
_isCurrentlyOnLargeVideo: boolean,
|
141
|
141
|
|
|
142
|
+ /**
|
|
143
|
+ * Whether we are currently running in a mobile browser.
|
|
144
|
+ */
|
|
145
|
+ _isMobile: boolean,
|
|
146
|
+
|
142
|
147
|
/**
|
143
|
148
|
* Indicates whether the participant is screen sharing.
|
144
|
149
|
*/
|
|
@@ -612,7 +617,7 @@ class Thumbnail extends Component<Props, State> {
|
612
|
617
|
* @returns {ReactElement}
|
613
|
618
|
*/
|
614
|
619
|
_renderFakeParticipant() {
|
615
|
|
- const { _participant: { avatarURL } } = this.props;
|
|
620
|
+ const { _isMobile, _participant: { avatarURL } } = this.props;
|
616
|
621
|
const styles = this._getStyles();
|
617
|
622
|
const containerClassName = this._getContainerClassName();
|
618
|
623
|
|
|
@@ -621,8 +626,10 @@ class Thumbnail extends Component<Props, State> {
|
621
|
626
|
className = { containerClassName }
|
622
|
627
|
id = 'sharedVideoContainer'
|
623
|
628
|
onClick = { this._onClick }
|
624
|
|
- onMouseEnter = { this._onMouseEnter }
|
625
|
|
- onMouseLeave = { this._onMouseLeave }
|
|
629
|
+ { ...(_isMobile ? {} : {
|
|
630
|
+ onMouseEnter: this._onMouseEnter,
|
|
631
|
+ onMouseLeave: this._onMouseLeave
|
|
632
|
+ }) }
|
626
|
633
|
style = { styles.thumbnail }>
|
627
|
634
|
{avatarURL ? (
|
628
|
635
|
<img
|
|
@@ -753,6 +760,7 @@ class Thumbnail extends Component<Props, State> {
|
753
|
760
|
const {
|
754
|
761
|
_defaultLocalDisplayName,
|
755
|
762
|
_disableLocalVideoFlip,
|
|
763
|
+ _isMobile,
|
756
|
764
|
_isScreenSharing,
|
757
|
765
|
_localFlipX,
|
758
|
766
|
_disableProfile,
|
|
@@ -772,13 +780,17 @@ class Thumbnail extends Component<Props, State> {
|
772
|
780
|
className = { containerClassName }
|
773
|
781
|
id = 'localVideoContainer'
|
774
|
782
|
onClick = { this._onClick }
|
775
|
|
- onMouseEnter = { this._onMouseEnter }
|
776
|
|
- onMouseLeave = { this._onMouseLeave }
|
777
|
|
- { ...(isMobileBrowser() ? {
|
778
|
|
- onTouchEnd: this._onTouchEnd,
|
779
|
|
- onTouchMove: this._onTouchMove,
|
780
|
|
- onTouchStart: this._onTouchStart
|
781
|
|
- } : {}) }
|
|
783
|
+ { ...(_isMobile
|
|
784
|
+ ? {
|
|
785
|
+ onTouchEnd: this._onTouchEnd,
|
|
786
|
+ onTouchMove: this._onTouchMove,
|
|
787
|
+ onTouchStart: this._onTouchStart
|
|
788
|
+ }
|
|
789
|
+ : {
|
|
790
|
+ onMouseEnter: this._onMouseEnter,
|
|
791
|
+ onMouseLeave: this._onMouseLeave
|
|
792
|
+ }
|
|
793
|
+ ) }
|
782
|
794
|
style = { styles.thumbnail }>
|
783
|
795
|
<div className = 'videocontainer__background' />
|
784
|
796
|
<span id = 'localVideoWrapper'>
|
|
@@ -875,6 +887,7 @@ class Thumbnail extends Component<Props, State> {
|
875
|
887
|
*/
|
876
|
888
|
_renderRemoteParticipant() {
|
877
|
889
|
const {
|
|
890
|
+ _isMobile,
|
878
|
891
|
_isTestModeEnabled,
|
879
|
892
|
_participant,
|
880
|
893
|
_startSilent,
|
|
@@ -909,13 +922,17 @@ class Thumbnail extends Component<Props, State> {
|
909
|
922
|
className = { containerClassName }
|
910
|
923
|
id = { `participant_${id}` }
|
911
|
924
|
onClick = { this._onClick }
|
912
|
|
- onMouseEnter = { this._onMouseEnter }
|
913
|
|
- onMouseLeave = { this._onMouseLeave }
|
914
|
|
- { ...(isMobileBrowser() ? {
|
915
|
|
- onTouchEnd: this._onTouchEnd,
|
916
|
|
- onTouchMove: this._onTouchMove,
|
917
|
|
- onTouchStart: this._onTouchStart
|
918
|
|
- } : {}) }
|
|
925
|
+ { ...(_isMobile
|
|
926
|
+ ? {
|
|
927
|
+ onTouchEnd: this._onTouchEnd,
|
|
928
|
+ onTouchMove: this._onTouchMove,
|
|
929
|
+ onTouchStart: this._onTouchStart
|
|
930
|
+ }
|
|
931
|
+ : {
|
|
932
|
+ onMouseEnter: this._onMouseEnter,
|
|
933
|
+ onMouseLeave: this._onMouseLeave
|
|
934
|
+ }
|
|
935
|
+ ) }
|
919
|
936
|
style = { styles.thumbnail }>
|
920
|
937
|
{
|
921
|
938
|
_videoTrack && <VideoTrack
|
|
@@ -1031,6 +1048,7 @@ function _mapStateToProps(state, ownProps): Object {
|
1031
|
1048
|
} = state['features/base/config'];
|
1032
|
1049
|
const { NORMAL = 8 } = interfaceConfig.INDICATOR_FONT_SIZES || {};
|
1033
|
1050
|
const { localFlipX } = state['features/base/settings'];
|
|
1051
|
+ const _isMobile = isMobileBrowser();
|
1034
|
1052
|
|
1035
|
1053
|
|
1036
|
1054
|
switch (_currentLayout) {
|
|
@@ -1072,7 +1090,7 @@ function _mapStateToProps(state, ownProps): Object {
|
1072
|
1090
|
return {
|
1073
|
1091
|
_audioTrack,
|
1074
|
1092
|
_connectionIndicatorAutoHideEnabled: interfaceConfig.CONNECTION_INDICATOR_AUTO_HIDE_ENABLED,
|
1075
|
|
- _connectionIndicatorDisabled: isMobileBrowser() || interfaceConfig.CONNECTION_INDICATOR_DISABLED,
|
|
1093
|
+ _connectionIndicatorDisabled: _isMobile || interfaceConfig.CONNECTION_INDICATOR_DISABLED,
|
1076
|
1094
|
_currentLayout,
|
1077
|
1095
|
_defaultLocalDisplayName: interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME,
|
1078
|
1096
|
_disableLocalVideoFlip: Boolean(disableLocalVideoFlip),
|
|
@@ -1081,6 +1099,7 @@ function _mapStateToProps(state, ownProps): Object {
|
1081
|
1099
|
_isAudioOnly: Boolean(state['features/base/audio-only'].enabled),
|
1082
|
1100
|
_isCurrentlyOnLargeVideo: state['features/large-video']?.participantId === id,
|
1083
|
1101
|
_isDominantSpeakerDisabled: interfaceConfig.DISABLE_DOMINANT_SPEAKER_INDICATOR,
|
|
1102
|
+ _isMobile,
|
1084
|
1103
|
_isScreenSharing: _videoTrack?.videoType === 'desktop',
|
1085
|
1104
|
_isTestModeEnabled: isTestModeEnabled(state),
|
1086
|
1105
|
_isVideoPlayable: id && isVideoPlayable(state, id),
|