|
@@ -5,7 +5,7 @@ import React, { Component } from 'react';
|
5
|
5
|
// We need to reference these files directly to avoid loading things that are not available
|
6
|
6
|
// in this environment (e.g. JitsiMeetJS or interfaceConfig)
|
7
|
7
|
import StatelessAvatar from '../base/avatar/components/web/StatelessAvatar';
|
8
|
|
-import { getInitials } from '../base/avatar/functions';
|
|
8
|
+import { getAvatarColor, getInitials } from '../base/avatar/functions';
|
9
|
9
|
|
10
|
10
|
import Toolbar from './Toolbar';
|
11
|
11
|
|
|
@@ -24,6 +24,7 @@ type State = {
|
24
|
24
|
displayName: string,
|
25
|
25
|
formattedDisplayName: string,
|
26
|
26
|
isVideoDisplayed: boolean,
|
|
27
|
+ userID: string,
|
27
|
28
|
visible: boolean
|
28
|
29
|
};
|
29
|
30
|
|
|
@@ -50,6 +51,7 @@ export default class AlwaysOnTop extends Component<*, State> {
|
50
|
51
|
displayName: '',
|
51
|
52
|
formattedDisplayName: '',
|
52
|
53
|
isVideoDisplayed: true,
|
|
54
|
+ userID: '',
|
53
|
55
|
visible: true
|
54
|
56
|
};
|
55
|
57
|
|
|
@@ -132,7 +134,8 @@ export default class AlwaysOnTop extends Component<*, State> {
|
132
|
134
|
avatarURL,
|
133
|
135
|
displayName,
|
134
|
136
|
formattedDisplayName,
|
135
|
|
- isVideoDisplayed
|
|
137
|
+ isVideoDisplayed,
|
|
138
|
+ userID
|
136
|
139
|
});
|
137
|
140
|
}
|
138
|
141
|
|
|
@@ -175,7 +178,7 @@ export default class AlwaysOnTop extends Component<*, State> {
|
175
|
178
|
* @returns {ReactElement}
|
176
|
179
|
*/
|
177
|
180
|
_renderVideoNotAvailableScreen() {
|
178
|
|
- const { avatarURL, displayName, formattedDisplayName, isVideoDisplayed } = this.state;
|
|
181
|
+ const { avatarURL, displayName, formattedDisplayName, isVideoDisplayed, userID } = this.state;
|
179
|
182
|
|
180
|
183
|
if (isVideoDisplayed) {
|
181
|
184
|
return null;
|
|
@@ -185,6 +188,7 @@ export default class AlwaysOnTop extends Component<*, State> {
|
185
|
188
|
<div id = 'videoNotAvailableScreen'>
|
186
|
189
|
<div id = 'avatarContainer'>
|
187
|
190
|
<StatelessAvatar
|
|
191
|
+ color = { getAvatarColor(userID) }
|
188
|
192
|
id = 'avatar'
|
189
|
193
|
initials = { getInitials(displayName) }
|
190
|
194
|
url = { avatarURL } />)
|