palavatv / palava-web

Front-end of palava.tv
https://palava.tv
MIT License
10 stars 4 forks source link

Generate a logo and a color for each participant #51

Open farao opened 4 years ago

farao commented 4 years ago

There are at least two different cases in which we would want to identify a person by some unique "identifier":

Possible solutions are:

  1. let a user choose a name (and probably generate one for those who don't choose one)
  2. choose some other identifier - I propose to have a combination of a logo and a color.

Choosing 2 could also have a security aspect: If it's possible to get a fingerprint or the whole public key of every participant - we may choose a logo/color combination matching that and so we see the same symbols/colors every time we chat with the same person (on the same device).

I would imagine this to appear as one more "bubble button" on the videos (or the audio field when only audio).

farao commented 4 years ago

To draft a possible solution:

  1. implement a function that takes some "seed value" and based on that chooses a color and a logo (where to take the logos from would be part of this question). If logos are downloaded (and not generated) they would go into an own folder under src/assets/ I guess. This function could for now be added to src/components/Peer.vue.
  2. in src/components/Peer.vue, look how the other <button>s are implemented (those are the buttons that appear on the videos) and add one for the generated logo (using the function from 1. - maybe until now with a random seed or so).
  3. Research if we can get from the peerconnection the public key (I guess we can take it from "peerconnection.currentLocalDescription" (for the user) and "peerconnection.currentRemoteDescription" (for the other participants)). Then take the public key (or its hash) as the seed for the logo/color chooser.
farao commented 4 years ago

Maybe first it could be only a logo or only a color - then the probably not so easy step to apply a color to the logo would be out of the way

thammi commented 4 years ago

Encryption keys are not persistent to prevent fingerprinting.

farao commented 4 years ago

Hm, ok, makes sense! I guess then we should probably use a hash of different information like the user agent. Or is it bad to allow users to recognise other people by this (e.g. if you chat 2 times with the same person/device) and we should just make it completely random?

thammi commented 4 years ago

Fingerprinting without the direct knowledge of the user and the ability to circumvent doesn't seem right to me. We could store a random value in local storage to keep the identity (gives user the ability to clear it and interacts well with browsers private mode). This mechanismwould probably need a method to prevent spoofing of that value (can't just send that value directly as it could just be copied).

I personally would prefer not to include such a non-obvious way to track the user and user a random non-persistent seed or a name that can be changed by the user.

janlelis commented 4 years ago

Possible solutions are:

1. let a user choose a name (and probably generate one for those who don't choose one)

2. choose some other identifier - I propose to have a combination of a logo and a color.

I would also prefer option 1 for now, generate a random name. Could also be something more sophisticated, like a random avatar.

Also note, currently all peer colors are random for every participants, everyone sees different colors. We could implement a mechanism to map a specific colors to the peers. If we do so, this should be accompanied by a name or avatar, since relying only on colors is bad accessibility-wise.

farao commented 4 years ago

avatar is what I mean by "logo". In any case I think colors might help a lot. I just though that choosing a name makes the whole interface more complex (and we need to find space to display the name), that's why I suggested avatar+color.