Merge branch 'fixes' of https://github.com/questo-ai/decentralized-video-chat into fixes
This commit is contained in:
commit
e5c92fe436
|
@ -838,7 +838,7 @@ function handleRecieveMessage(msg, color) {
|
|||
}
|
||||
|
||||
function uuidToHue(uuid) {
|
||||
// Using uuid to generate random. unique pastel color
|
||||
// Using uuid to generate random, unique pastel color
|
||||
var hash = 0;
|
||||
for (var i = 0; i < uuid.length; i++) {
|
||||
hash = uuid.charCodeAt(i) + ((hash << 5) - hash);
|
||||
|
@ -857,6 +857,7 @@ function uuidToHue(uuid) {
|
|||
}
|
||||
}
|
||||
}
|
||||
VideoChat.peerColors.set(uuid, hue);
|
||||
return hue;
|
||||
}
|
||||
|
||||
|
@ -868,7 +869,6 @@ function hueToColor(hue) {
|
|||
function setStreamColor(uuid) {
|
||||
const hue = uuidToHue(uuid);
|
||||
document.querySelectorAll(`[uuid="${uuid}"]`)[0].style.border = `3px solid ${hueToColor(hue)}`;
|
||||
VideoChat.peerColors.set(uuid, hue);
|
||||
}
|
||||
|
||||
// Show and hide chat
|
||||
|
|
Loading…
Reference in New Issue