openvidu-components: Generate stronger unique id for participants
This commit is contained in:
parent
8cdd4dd751
commit
8083e3b5cb
@ -68,7 +68,7 @@ export abstract class ParticipantAbstractModel {
|
||||
isMutedForcibly: boolean;
|
||||
|
||||
constructor(props: ParticipantProperties, model?: StreamModel) {
|
||||
this.id = props.id ? props.id : new Date().getTime().toString();
|
||||
this.id = props.id ? props.id : Math.random().toString(32).replace('.','_');
|
||||
this.local = props.local;
|
||||
this.nickname = props.nickname;
|
||||
this.colorProfile = !!props.colorProfile ? props.colorProfile : `hsl(${Math.random() * 360}, 100%, 80%)`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user