Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat: use participant id for avatar color

Bettenbuk Zoltan74d0013accbd
diff --git a/android/app/.classpath b/android/app/.classpath
new file mode 100644
index 0000000000..eb19361b57
--- /dev/null
+++ b/android/app/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
+ <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
+ <classpathentry kind="output" path="bin/default"/>
+</classpath>
diff --git a/android/app/.settings/org.eclipse.buildship.core.prefs b/android/app/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 0000000000..b1886adb46
--- /dev/null
+++ b/android/app/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
+connection.project.dir=..
+eclipse.preferences.version=1
diff --git a/android/sdk/.classpath b/android/sdk/.classpath
new file mode 100644
index 0000000000..eb19361b57
--- /dev/null
+++ b/android/sdk/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
+ <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
+ <classpathentry kind="output" path="bin/default"/>
+</classpath>
diff --git a/android/sdk/.settings/org.eclipse.buildship.core.prefs b/android/sdk/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 0000000000..b1886adb46
--- /dev/null
+++ b/android/sdk/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
+connection.project.dir=..
+eclipse.preferences.version=1
diff --git a/react/features/always-on-top/AlwaysOnTop.js b/react/features/always-on-top/AlwaysOnTop.js
index 31c74d9a10..875b2805ba 100644
--- a/react/features/always-on-top/AlwaysOnTop.js
+++ b/react/features/always-on-top/AlwaysOnTop.js
@@ -5,7 +5,7 @@ import React, { Component } from 'react';
// We need to reference these files directly to avoid loading things that are not available
// in this environment (e.g. JitsiMeetJS or interfaceConfig)
import StatelessAvatar from '../base/avatar/components/web/StatelessAvatar';
-import { getInitials } from '../base/avatar/functions';
+import { getAvatarColor, getInitials } from '../base/avatar/functions';
import Toolbar from './Toolbar';
@@ -24,6 +24,7 @@ type State = {
displayName: string,
formattedDisplayName: string,
isVideoDisplayed: boolean,
+ userID: string,
visible: boolean
};
@@ -50,6 +51,7 @@ export default class AlwaysOnTop extends Component<*, State> {
displayName: '',
formattedDisplayName: '',
isVideoDisplayed: true,
+ userID: '',
visible: true
};
@@ -132,7 +134,8 @@ export default class AlwaysOnTop extends Component<*, State> {
avatarURL,
displayName,
formattedDisplayName,
- isVideoDisplayed
+ isVideoDisplayed,
+ userID
});
}
@@ -175,7 +178,7 @@ export default class AlwaysOnTop extends Component<*, State> {
* @returns {ReactElement}
*/
_renderVideoNotAvailableScreen() {
- const { avatarURL, displayName, formattedDisplayName, isVideoDisplayed } = this.state;
+ const { avatarURL, displayName, formattedDisplayName, isVideoDisplayed, userID } = this.state;
if (isVideoDisplayed) {
return null;
@@ -185,6 +188,7 @@ export default class AlwaysOnTop extends Component<*, State> {
<div id = 'videoNotAvailableScreen'>
<div id = 'avatarContainer'>
<StatelessAvatar
+ color = { getAvatarColor(userID) }
id = 'avatar'
initials = { getInitials(displayName) }
url = { avatarURL } />)
diff --git a/react/features/base/avatar/components/Avatar.js b/react/features/base/avatar/components/Avatar.js
index 521b433e47..5243d28c40 100644
--- a/react/features/base/avatar/components/Avatar.js
+++ b/react/features/base/avatar/components/Avatar.js
@@ -175,13 +175,14 @@ class Avatar<P: Props> extends PureComponent<P, State> {
* @returns {Props}
*/
export function _mapStateToProps(state: Object, ownProps: Props) {
- const { displayName, participantId } = ownProps;
+ const { colorBase, displayName, participantId } = ownProps;
const _participant = participantId && getParticipantById(state, participantId);
const _initialsBase = (_participant && _participant.name) || displayName;
return {
_initialsBase,
- _loadableAvatarUrl: _participant && _participant.loadableAvatarUrl
+ _loadableAvatarUrl: _participant && _participant.loadableAvatarUrl,
+ colorBase: !colorBase && _participant ? _participant.id : colorBase
};
}