Browse Source

feat: show on stage function

master
Bettenbuk Zoltan 5 years ago
parent
commit
ee2036a2a7

+ 3
- 0
css/_font.scss View File

@@ -25,6 +25,9 @@
25 25
     -moz-osx-font-smoothing: grayscale;
26 26
 }
27 27
 
28
+.icon-enlarge:before {
29
+  content: "\e90a";
30
+}
28 31
 .icon-signal_cellular_0:before {
29 32
   content: "\e901";
30 33
 }

BIN
fonts/jitsi.eot View File


+ 1
- 0
fonts/jitsi.svg View File

@@ -37,6 +37,7 @@
37 37
 <glyph unicode="&#xe907;" glyph-name="signal_cellular_2" d="M86 86l852 852v-852h-852z" />
38 38
 <glyph unicode="&#xe908;" glyph-name="share-doc" d="M554 640h236l-236 234v-234zM682 426v86h-340v-86h340zM682 256v86h-340v-86h340zM598 938l256-256v-512c0-46-40-84-86-84h-512c-46 0-86 38-86 84l2 684c0 46 38 84 84 84h342z" />
39 39
 <glyph unicode="&#xe909;" glyph-name="ninja" d="M330.667 469.333c-0.427 14.933 6.4 29.44 17.92 39.253 32-6.827 61.867-20.053 88.747-39.253 0-29.013-23.893-52.907-53.333-52.907s-52.907 23.467-53.333 52.907zM586.667 469.333c26.88 18.773 56.747 32 88.747 38.827 11.52-9.813 18.347-24.32 17.92-38.827 0-29.867-23.893-53.76-53.333-53.76s-53.333 23.893-53.333 53.76v0zM512 640c-118.187 1.707-234.667-27.733-338.347-85.333l-2.987-42.667c0-52.48 12.373-104.107 35.84-151.040 101.12 15.36 203.093 23.040 305.493 23.040s204.373-7.68 305.493-23.040c23.467 46.933 35.84 98.56 35.84 151.040l-2.987 42.667c-103.68 57.6-220.16 87.040-338.347 85.333zM512 938.667c235.641 0 426.667-191.025 426.667-426.667s-191.025-426.667-426.667-426.667c-235.641 0-426.667 191.025-426.667 426.667s191.025 426.667 426.667 426.667z" />
40
+<glyph unicode="&#xe90a;" glyph-name="enlarge" d="M896 212v600h-768v-600h768zM896 896q34 0 60-26t26-60v-596q0-34-26-60t-60-26h-768q-34 0-60 26t-26 60v596q0 34 26 60t60 26h768zM598 342l-86-108-86 108h172zM256 598v-172l-106 86zM768 598l106-86-106-86v172zM512 790l86-108h-172z" />
40 41
 <glyph unicode="&#xe90b;" glyph-name="full-screen" d="M598 810h212v-212h-84v128h-128v84zM726 298v128h84v-212h-212v84h128zM214 598v212h212v-84h-128v-128h-84zM298 426v-128h128v-84h-212v212h84z" />
41 42
 <glyph unicode="&#xe90c;" glyph-name="exit-full-screen" d="M682 682h128v-84h-212v212h84v-128zM598 214v212h212v-84h-128v-128h-84zM342 682v128h84v-212h-212v84h128zM214 342v84h212v-212h-84v128h-128z" />
42 43
 <glyph unicode="&#xe90d;" glyph-name="security" d="M768 170v428h-512v-428h512zM768 682c46 0 86-38 86-84v-428c0-46-40-84-86-84h-512c-46 0-86 38-86 84v428c0 46 40 84 86 84h388v86c0 72-60 132-132 132s-132-60-132-132h-82c0 118 96 214 214 214s214-96 214-214v-86h42zM512 298c-46 0-86 40-86 86s40 86 86 86 86-40 86-86-40-86-86-86z" />

BIN
fonts/jitsi.ttf View File


BIN
fonts/jitsi.woff View File


+ 1
- 1
fonts/selection.json
File diff suppressed because it is too large
View File


+ 2
- 0
lang/main.json View File

@@ -638,6 +638,7 @@
638 638
             "shareRoom": "Invite someone",
639 639
             "shareYourScreen": "Toggle screenshare",
640 640
             "shortcuts": "Toggle shortcuts",
641
+            "show": "Show on stage",
641 642
             "speakerStats": "Toggle speaker statistics",
642 643
             "tileView": "Toggle tile view",
643 644
             "toggleCamera": "Toggle camera",
@@ -763,6 +764,7 @@
763 764
         "mute": "Member is muted",
764 765
         "muted": "Muted",
765 766
         "remoteControl": "Remote control",
767
+        "show": "Show on stage",
766 768
         "videomute": "Member has stopped the camera"
767 769
     },
768 770
     "welcomepage": {

+ 1
- 13
react/features/filmstrip/components/native/Thumbnail.js View File

@@ -11,7 +11,6 @@ import {
11 11
     PARTICIPANT_ROLE,
12 12
     ParticipantView,
13 13
     isEveryoneModerator,
14
-    isLocalParticipantModerator,
15 14
     pinParticipant
16 15
 } from '../../../base/participants';
17 16
 import { Container } from '../../../base/react';
@@ -45,11 +44,6 @@ type Props = {
45 44
      */
46 45
     _isEveryoneModerator: boolean,
47 46
 
48
-    /**
49
-     * True if the local participant is a moderator.
50
-     */
51
-    _isModerator: boolean,
52
-
53 47
     /**
54 48
      * The Redux representation of the state "features/large-video".
55 49
      */
@@ -124,7 +118,6 @@ class Thumbnail extends Component<Props> {
124 118
         const {
125 119
             _audioTrack: audioTrack,
126 120
             _isEveryoneModerator,
127
-            _isModerator,
128 121
             _largeVideo: largeVideo,
129 122
             _onClick,
130 123
             _onShowRemoteVideoMenu,
@@ -148,14 +141,11 @@ class Thumbnail extends Component<Props> {
148 141
         const participantInLargeVideo
149 142
             = participantId === largeVideo.participantId;
150 143
         const videoMuted = !videoTrack || videoTrack.muted;
151
-        const showRemoteVideoMenu = _isModerator && !participant.local;
152 144
 
153 145
         return (
154 146
             <Container
155 147
                 onClick = { _onClick }
156
-                onLongPress = {
157
-                    showRemoteVideoMenu
158
-                        ? _onShowRemoteVideoMenu : undefined }
148
+                onLongPress = { participant.local ? undefined : _onShowRemoteVideoMenu }
159 149
                 style = { [
160 150
                     styles.thumbnail,
161 151
                     participant.pinned && !tileView
@@ -265,7 +255,6 @@ function _mapDispatchToProps(dispatch: Function, ownProps): Object {
265 255
  * @param {Props} ownProps - Properties of component.
266 256
  * @returns {{
267 257
  *      _audioTrack: Track,
268
- *      _isModerator: boolean,
269 258
  *      _largeVideo: Object,
270 259
  *      _styles: StyleType,
271 260
  *      _videoTrack: Track
@@ -286,7 +275,6 @@ function _mapStateToProps(state, ownProps) {
286 275
     return {
287 276
         _audioTrack: audioTrack,
288 277
         _isEveryoneModerator: isEveryoneModerator(state),
289
-        _isModerator: isLocalParticipantModerator(state),
290 278
         _largeVideo: largeVideo,
291 279
         _styles: ColorSchemeRegistry.get(state, 'Thumbnail'),
292 280
         _videoTrack: videoTrack

+ 12
- 5
react/features/remote-video-menu/components/native/KickButton.js View File

@@ -1,14 +1,21 @@
1 1
 // @flow
2 2
 
3 3
 import { translate } from '../../../base/i18n';
4
+import { isLocalParticipantModerator } from '../../../base/participants';
4 5
 import { connect } from '../../../base/redux';
5 6
 
6 7
 import AbstractKickButton from '../AbstractKickButton';
7 8
 
8 9
 /**
9
- * We don't need any further implementation for this on mobile, but we keep it
10
- * here for clarity and consistency with web. Once web uses the
11
- * {@code AbstractButton} base class, we can remove all these and just use
12
- * the {@code AbstractKickButton} as {@KickButton}.
10
+ * Maps part of the Redux state to the props of this component.
11
+ *
12
+ * @param {Object} state - The Redux state.
13
+ * @returns {Props}
13 14
  */
14
-export default translate(connect()(AbstractKickButton));
15
+function _mapStateToProps(state) {
16
+    return {
17
+        visible: isLocalParticipantModerator(state)
18
+    };
19
+}
20
+
21
+export default translate(connect(_mapStateToProps)(AbstractKickButton));

+ 14
- 5
react/features/remote-video-menu/components/native/MuteButton.js View File

@@ -1,14 +1,23 @@
1 1
 // @flow
2 2
 
3 3
 import { translate } from '../../../base/i18n';
4
+import { isLocalParticipantModerator } from '../../../base/participants';
4 5
 import { connect } from '../../../base/redux';
5 6
 
6
-import AbstractMuteButton, { _mapStateToProps } from '../AbstractMuteButton';
7
+import AbstractMuteButton, { _mapStateToProps as _abstractMapStateToProps } from '../AbstractMuteButton';
7 8
 
8 9
 /**
9
- * We don't need any further implementation for this on mobile, but we keep it
10
- * here for clarity and consistency with web. Once web uses the
11
- * {@code AbstractButton} base class, we can remove all these and just use
12
- * the {@code AbstractMuteButton} as {@MuteButton}.
10
+ * Maps part of the Redux state to the props of this component.
11
+ *
12
+ * @param {Object} state - The Redux state.
13
+ * @param {Object} ownProps - Properties of component.
14
+ * @returns {Props}
13 15
  */
16
+function _mapStateToProps(state, ownProps) {
17
+    return {
18
+        ..._abstractMapStateToProps(state, ownProps),
19
+        visible: isLocalParticipantModerator(state)
20
+    };
21
+}
22
+
14 23
 export default translate(connect(_mapStateToProps)(AbstractMuteButton));

+ 65
- 0
react/features/remote-video-menu/components/native/PinButton.js View File

@@ -0,0 +1,65 @@
1
+// @flow
2
+
3
+import { translate } from '../../../base/i18n';
4
+import { pinParticipant } from '../../../base/participants';
5
+import { connect } from '../../../base/redux';
6
+import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox';
7
+
8
+export type Props = AbstractButtonProps & {
9
+
10
+    /**
11
+     * True if tile view is currently enabled.
12
+     */
13
+    _tileViewEnabled: boolean,
14
+
15
+    /**
16
+     * The redux {@code dispatch} function.
17
+     */
18
+    dispatch: Function,
19
+
20
+    /**
21
+     * The ID of the participant that this button is supposed to pin.
22
+     */
23
+    participantID: string,
24
+
25
+    /**
26
+     * The function to be used to translate i18n labels.
27
+     */
28
+    t: Function
29
+};
30
+
31
+/**
32
+ * A remote video menu button which pins a participant and exist the tile view.
33
+ */
34
+class PinButton extends AbstractButton<Props, *> {
35
+    accessibilityLabel = 'toolbar.accessibilityLabel.show';
36
+    iconName = 'icon-enlarge';
37
+    label = 'videothumbnail.show';
38
+
39
+    /**
40
+     * Handles clicking / pressing the button, and kicks the participant.
41
+     *
42
+     * @private
43
+     * @returns {void}
44
+     */
45
+    _handleClick() {
46
+        const { dispatch } = this.props;
47
+
48
+        // Pin participant, it will automatically exit the tile view
49
+        dispatch(pinParticipant(this.props.participantID));
50
+    }
51
+}
52
+
53
+/**
54
+ * Maps part of the Redux state to the props of this component.
55
+ *
56
+ * @param {Object} state - The Redux state.
57
+ * @returns {Props}
58
+ */
59
+function _mapStateToProps(state) {
60
+    return {
61
+        visible: state['features/video-layout'].tileViewEnabled
62
+    };
63
+}
64
+
65
+export default translate(connect(_mapStateToProps)(PinButton));

+ 2
- 0
react/features/remote-video-menu/components/native/RemoteVideoMenu.js View File

@@ -19,6 +19,7 @@ import { hideRemoteVideoMenu } from '../../actions';
19 19
 
20 20
 import KickButton from './KickButton';
21 21
 import MuteButton from './MuteButton';
22
+import PinButton from './PinButton';
22 23
 import styles from './styles';
23 24
 
24 25
 /**
@@ -94,6 +95,7 @@ class RemoteVideoMenu extends Component<Props> {
94 95
                 </View>
95 96
                 <MuteButton { ...buttonProps } />
96 97
                 <KickButton { ...buttonProps } />
98
+                <PinButton { ...buttonProps } />
97 99
             </BottomSheet>
98 100
         );
99 101
     }

Loading…
Cancel
Save