Browse Source

feat(recording): new icon when recording is active (#2884)

- Update font files to add new icon.
- Update markup and style so the icon has a small background
  to fill in the text of the icon.
- Remove some css transitions that don't seem to do much.
j8
virtuacoplenny 7 years ago
parent
commit
0a0256501c

+ 3
- 0
css/_font.scss View File

@@ -198,3 +198,6 @@
198 198
 .icon-camera-take-picture:before {
199 199
   content: "\e92a";
200 200
 }
201
+.icon-rec:before {
202
+  content: "\e92b";
203
+}

+ 30
- 2
css/modals/video-quality/_video-quality.scss View File

@@ -153,6 +153,12 @@
153 153
     position: absolute;
154 154
     box-sizing: border-box;
155 155
 
156
+    &.is-recording {
157
+        background: none;
158
+        opacity: 0.9;
159
+        padding: 0;
160
+    }
161
+
156 162
     i {
157 163
         line-height: $videoStateIndicatorSize;
158 164
     }
@@ -165,6 +171,30 @@
165 171
         min-width: $videoStateIndicatorSize;
166 172
         text-align: center;
167 173
     }
174
+
175
+    .recording-icon,
176
+    .recording-icon i {
177
+        color: rgb(255, 86, 48);
178
+        line-height: $videoStateIndicatorSize;
179
+        font-size: $videoStateIndicatorSize;
180
+        opacity: 0.9;
181
+        position: relative;
182
+    }
183
+
184
+    .recording-icon-background {
185
+        background: white;
186
+        height: 25%;
187
+        left: 50%;
188
+        opacity: 0.9;
189
+        position: absolute;
190
+        top: 50%;
191
+        transform: translate(-50%, -50%);
192
+        width: 80%;
193
+    }
194
+
195
+    #recordingLabelText {
196
+        display: inline-block;
197
+    }
168 198
 }
169 199
 
170 200
 .centeredVideoLabel.moveToCorner {
@@ -186,8 +216,6 @@
186 216
     &.moveToCorner {
187 217
         bottom: auto;
188 218
         transform: none;
189
-        -webkit-transition: all 2s 2s linear;
190
-        transition: all 2s 2s linear;
191 219
     }
192 220
 }
193 221
 

BIN
fonts/jitsi.eot View File


+ 1
- 0
fonts/jitsi.svg View File

@@ -68,4 +68,5 @@
68 68
 <glyph unicode="&#xe928;" glyph-name="LD" d="M512 0c-282.77 0-512 229.23-512 512s229.23 512 512 512c282.77 0 512-229.23 512-512s-229.23-512-512-512zM472.4 433.325h-112.35v206.5h-52.85v-252.525h165.2v46.025zM520.35 640v-252.7h99.4c75.6 0 118.475 46.025 118.475 128.1 0 79.1-43.4 124.6-118.475 124.6h-99.4zM573.2 594.85v-162.4h38.15c46.725 0 72.975 28.7 72.975 82.075 0 51.1-27.125 80.325-72.975 80.325h-38.15z" />
69 69
 <glyph unicode="&#xe929;" glyph-name="SD" d="M512 0c-282.77 0-512 229.23-512 512s229.23 512 512 512c282.77 0 512-229.23 512-512s-229.23-512-512-512zM281.6 451.175c1.925-47.075 40.95-76.65 101.15-76.65 63.35 0 102.375 31.15 102.375 82.075 0 39.2-21.875 61.075-72.625 71.75l-30.45 6.475c-29.575 6.3-41.65 15.225-41.65 30.8 0 19.25 17.5 31.5 43.925 31.5 25.55 0 44.1-13.3 46.55-33.25h49.7c-1.575 44.975-40.95 76.125-96.6 76.125-58.275 0-96.6-31.325-96.6-78.925 0-38.5 22.575-62.475 68.6-72.1l32.9-7c30.975-6.65 43.575-15.925 43.575-32.025 0-19.075-19.425-32.375-46.9-32.375-29.75 0-50.4 13.125-52.85 33.6h-51.1zM535 633.7v-252.7h99.4c75.6 0 118.475 46.025 118.475 128.1 0 79.1-43.4 124.6-118.475 124.6h-99.4zM587.85 588.55v-162.4h38.15c46.725 0 72.975 28.7 72.975 82.075 0 51.1-27.125 80.325-72.975 80.325h-38.15z" />
70 70
 <glyph unicode="&#xe92a;" glyph-name="camera-take-picture" d="M725.333 512c0-117.821-95.513-213.333-213.333-213.333s-213.333 95.513-213.333 213.333c0 117.821 95.513 213.333 213.333 213.333s213.333-95.513 213.333-213.333zM512 256c141.385 0 256 114.615 256 256s-114.615 256-256 256v0c-141.385 0-256-114.615-256-256s114.615-256 256-256v0zM512 213.333c-164.949 0-298.667 133.718-298.667 298.667s133.718 298.667 298.667 298.667v0c164.949 0 298.667-133.718 298.667-298.667s-133.718-298.667-298.667-298.667v0z" />
71
+<glyph unicode="&#xe92b;" glyph-name="rec" d="M512 0c-282.77 0-512 229.23-512 512s229.23 512 512 512c282.77 0 512-229.23 512-512s-229.23-512-512-512zM581.333 433.782h-110.595v59.233h104.338v40.332h-104.338v56.87h110.595v43.539h-161.665v-243.512h161.665v43.539zM738.771 384c58.849 0 101.802 36.282 106.029 88.933h-49.717c-4.904-26.832-26.888-44.045-56.143-44.045-38.556 0-62.4 31.895-62.4 83.196s23.844 83.027 62.231 83.027c29.086 0 51.239-18.394 56.143-46.407h49.717c-3.72 52.989-48.026 91.296-105.86 91.296-70.855 0-114.485-48.77-114.485-127.916 0-79.314 43.798-128.084 114.485-128.084zM230.27 478.502h41.769l45.489-88.258h57.834l-51.408 96.19c28.072 11.138 44.306 38.138 44.306 69.189 0 48.432-32.976 78.133-86.582 78.133h-102.478v-243.512h51.070v88.258zM230.27 592.58v-74.927h44.813c25.704 0 40.754 13.838 40.754 37.295 0 23.119-15.896 37.632-41.262 37.632h-44.306z" />
71 72
 </font></defs></svg>

BIN
fonts/jitsi.ttf View File


BIN
fonts/jitsi.woff View File


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


+ 212
- 183
react/features/base/font-icons/jitsi.json
File diff suppressed because it is too large
View File


+ 28
- 23
react/features/recording/components/RecordingLabel.web.js View File

@@ -3,6 +3,7 @@ import React, { Component } from 'react';
3 3
 import { connect } from 'react-redux';
4 4
 
5 5
 import { translate } from '../../base/i18n';
6
+import { JitsiRecordingStatus } from '../../base/lib-jitsi-meet';
6 7
 
7 8
 /**
8 9
  * Implements a React {@link Component} which displays the current state of
@@ -25,6 +26,11 @@ class RecordingLabel extends Component {
25 26
          */
26 27
         _filmstripVisible: PropTypes.bool,
27 28
 
29
+        /**
30
+         * Whether or not the conference is currently being recorded.
31
+         */
32
+        _isRecording: PropTypes.bool,
33
+
28 34
         /**
29 35
          * An object to describe the {@code RecordingLabel} content. If no
30 36
          * translation key to display is specified, the label will apply CSS to
@@ -87,12 +93,13 @@ class RecordingLabel extends Component {
87 93
      * @returns {ReactElement}
88 94
      */
89 95
     render() {
90
-        const { _labelDisplayConfiguration } = this.props;
96
+        const { _isRecording, _labelDisplayConfiguration } = this.props;
91 97
         const { centered, key, showSpinner } = _labelDisplayConfiguration || {};
92 98
 
93 99
         const isVisible = Boolean(key);
94 100
         const rootClassName = [
95 101
             'video-state-indicator centeredVideoLabel',
102
+            _isRecording ? 'is-recording' : '',
96 103
             isVisible ? 'show-inline' : '',
97 104
             centered ? '' : 'moveToCorner',
98 105
             this.state.filmstripBecomingVisible ? 'opening' : '',
@@ -101,19 +108,24 @@ class RecordingLabel extends Component {
101 108
         ].join(' ');
102 109
 
103 110
         return (
104
-            <span
111
+            <div
105 112
                 className = { rootClassName }
106 113
                 id = 'recordingLabel'>
107
-                <span id = 'recordingLabelText'>
108
-                    { this.props.t(key) }
109
-                </span>
110
-                { showSpinner
111
-                    ? <img
114
+                { _isRecording
115
+                    ? <div className = 'recording-icon'>
116
+                        <div className = 'recording-icon-background' />
117
+                        <i className = 'icon-rec' />
118
+                    </div>
119
+                    : <div id = 'recordingLabelText'>
120
+                        { this.props.t(key) }
121
+                    </div> }
122
+                { !_isRecording
123
+                    && showSpinner
124
+                    && <img
112 125
                         className = 'recordingSpinner'
113 126
                         id = 'recordingSpinner'
114
-                        src = 'images/spin.svg' />
115
-                    : null }
116
-            </span>
127
+                        src = 'images/spin.svg' /> }
128
+            </div>
117 129
         );
118 130
     }
119 131
 }
@@ -126,27 +138,20 @@ class RecordingLabel extends Component {
126 138
  * @private
127 139
  * @returns {{
128 140
  *     _filmstripVisible: boolean,
141
+ *     _isRecording: boolean,
129 142
  *     _labelDisplayConfiguration: Object
130 143
  * }}
131 144
  */
132 145
 function _mapStateToProps(state) {
133 146
     const { visible } = state['features/filmstrip'];
134
-    const { labelDisplayConfiguration } = state['features/recording'];
147
+    const {
148
+        labelDisplayConfiguration,
149
+        recordingState
150
+    } = state['features/recording'];
135 151
 
136 152
     return {
137
-        /**
138
-         * Whether or not the filmstrip is currently set to be displayed.
139
-         *
140
-         * @type {boolean}
141
-         */
142 153
         _filmstripVisible: visible,
143
-
144
-        /**
145
-         * An object describing how {@code RecordingLabel} should display its
146
-         * contents.
147
-         *
148
-         * @type {Object}
149
-         */
154
+        _isRecording: recordingState === JitsiRecordingStatus.ON,
150 155
         _labelDisplayConfiguration: labelDisplayConfiguration
151 156
     };
152 157
 }

Loading…
Cancel
Save