Fixing a race condition in Jitsi
When setting the name, in rare cases, Jitsi was not initialized yet and setting the name would cause a JS error. We are now waiting for Jitsi to be properly initialized before setting the name.
This commit is contained in:
parent
b959ce7a6d
commit
79db6c8f3b
@ -197,7 +197,10 @@ class JitsiFactory {
|
||||
|
||||
options.onload = () => doResolve(); //we want for the iframe to be loaded before triggering animations.
|
||||
this.jitsiApi = new window.JitsiMeetExternalAPI(domain, options);
|
||||
this.jitsiApi.executeCommand("displayName", playerName);
|
||||
|
||||
this.jitsiApi.addListener("videoConferenceJoined", () => {
|
||||
this.jitsiApi?.executeCommand("displayName", playerName);
|
||||
});
|
||||
|
||||
this.jitsiApi.addListener("audioMuteStatusChanged", this.audioCallback);
|
||||
this.jitsiApi.addListener("videoMuteStatusChanged", this.videoCallback);
|
||||
|
Loading…
Reference in New Issue
Block a user