Hidden User Question - Full Code

I am trying to get my hidden user working correctly, having some issues where it still connects and can use some help. To start.

File /etc/prosody/conf.avail/meet.example.com.cfg.lua

VirtualHost "recorder.meet.example.com"
    authentication = "anonymous"
    modules_enabled = {
     "turncredentials";
    }
    c2s_require_encryption = false

VirtualHost "meet.example.com"
        -- enabled = false -- Remove this line to enable this host
        authentication = "internal_hashed"

Then in the file /etc/jitsi/jicofo/sip-communicator.properties

org.jitsi.jicofo.BRIDGE_MUC=JvbBrewery@internal.auth.meet.example.com
org.jitsi.jicofo.auth.URL=XMPP:meet.examplecom

Afterwards I created a user and password.

sudo prosodyctl register <username> jitsi-meet.example.com <password>

And then in /etc/jitsi/meet/meet.example.com-config.js .

var config = {
    // Connection
    //

    hosts: {
        // XMPP domain.
        domain: 'meet.example.com',
        hiddenDomain: 'recorder.meet.example.com',

That takes care of the server side. My javacript then looks like this:

const domain = 'meet.example.com';

            const options = {
                roomName: a_room,
                width: 700,
                height: 700,
                parentNode: document.querySelector('#webrtc'),
                configOverwrite: { 
                    startWithAudioMuted: true, 
                    startWithVideoMuted: true, 
                    desktopSharingChromeDisabled: true,
                    desktopSharingFirefoxDisabled: true,
                    enableWelcomePage: false,
                    hideLobbyButton: true,
                    hiddenDomain: "recorder.meet.example.com",
                },
                interfaceConfigOverwrite: {
                    filmStripOnly: true, 
                    startWithAudioMuted: true,
                    startWithVideoMuted: true,
                    TOOLBAR_BUTTONS : [],
                    SETTINGS_SECTIONS : []
                }
            };

            window.localStorage.setItem('xmpp_username_override', '<username>');
            window.localStorage.setItem('xmpp_password_override', '<password>'); 

            const api = new JitsiMeetExternalAPI(domain, options);

            api.executeCommand("displayName", "Watcher");

But the watcher user still shows. What am I doing wrong here? My goal is to achieve hidden users.

Here you must be logging using recorder.meet.example.com, and that virtual host must be configured as not anonymous

Thanks! Can you give an example of logging in using recorder.meet.example.com?

And what are other options to use besides annoymous?

I noticed this question has a lott of issues on the board, so I am trying to post a more complete example to help future developers as well. @damencho

Also the following has no effect, even after restarting jitsi:

VirtualHost "recorder.meet.example.com"

authentication **=** "internal_hashed"

modules_enabled **=** **{**

"turncredentials";

**}**

c2s_require_encryption **=** **false**

And the JS

    window.localStorage.setItem('xmpp_username_override', '<username>@recorder.meet.bingewave.com');
    window.localStorage.setItem('xmpp_password_override', '<passsword>'); 

Watcher still shows up, and I can still login no problem.