From 4d2c87bdc49f662f07cfcf128d8be26b60a8c0d6 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Tue, 4 Apr 2023 23:09:02 +0200 Subject: [PATCH] Update README.FRONTEND. --- README.FRONTEND | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.FRONTEND b/README.FRONTEND index 274f418..89fbc9d 100644 --- a/README.FRONTEND +++ b/README.FRONTEND @@ -73,7 +73,7 @@ will trigger. There, you update your user interface and request incoming streams: ```javascript -serverConnection.onjoined = function(kind, group, perms, status, data, message) { +serverConnection.onjoined = function(kind, group, perms, status, data, error, message) { switch(kind) { case 'join': this.request({'':['audio','video']}); @@ -87,7 +87,13 @@ serverConnection.onjoined = function(kind, group, perms, status, data, message) document.location.href = message; break; case 'fail': - // display the friendly error message + if(error === 'need-username') { + // the user attempted to login with a token that does not + // specify a username. Display a dialog requesting a username, + // then join again + } else { + // display the friendly error message + } break; } ```