mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Generate stronger unique id for participants
parent
8cdd4dd751
commit
8083e3b5cb
|
@ -68,7 +68,7 @@ export abstract class ParticipantAbstractModel {
|
||||||
isMutedForcibly: boolean;
|
isMutedForcibly: boolean;
|
||||||
|
|
||||||
constructor(props: ParticipantProperties, model?: StreamModel) {
|
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.local = props.local;
|
||||||
this.nickname = props.nickname;
|
this.nickname = props.nickname;
|
||||||
this.colorProfile = !!props.colorProfile ? props.colorProfile : `hsl(${Math.random() * 360}, 100%, 80%)`;
|
this.colorProfile = !!props.colorProfile ? props.colorProfile : `hsl(${Math.random() * 360}, 100%, 80%)`;
|
||||||
|
|
Loading…
Reference in New Issue