openvidu-components: Generate stronger unique id for participants

pull/780/head
Carlos Santos 2023-02-10 15:50:20 +01:00
parent 8cdd4dd751
commit 8083e3b5cb
1 changed files with 1 additions and 1 deletions

View File

@ -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%)`;