Jitsi Meet Iframe API: Setting consistent displayname

Hello. I’m trying to embed jitsi meet in php page. I initialize jitsi api instance according to documentation and room selection interface is displayed just fine. Username is set and watermark is gone according to my settings. But as soon as I join or create a room all the settings are reset - username is “me” again and watermark is shown. How can I persist the settings?

That’s the code I use for inititalization:

const domain = ‘meet.my.domain’;
const options = {
width: ‘100%’,
height: ‘100%’,
parentNode: document.querySelector(’#meet’),
interfaceConfigOverwrite: {
SHOW_JITSI_WATERMARK: false,
SHOW_WATERMARK_FOR_GUESTS: false
},
userInfo: {
email: ‘<?= $USER->getEmail()?>’,
displayName: ‘<?= $USER->GetFullName()?>’
}
};
const api = new JitsiMeetExternalAPI(domain, options);

So I managed to save displayname and email. It seems that options used in Jitsi constructor are not getting saved in localstorage. If I use executeCommands to set displayName after Jitsi instance is created it persists displayName in localstorage. As for watermark, I’m just gonna change config on the server. Still I don’t get wha’ts the point of userInfo in the options if it’s not getting saved but just confuses people.

My working code.

const domain = ‘meet.my.domain’;
const options = {
width: ‘100%’,
height: ‘100%’,
parentNode: document.querySelector(’#meet’),
interfaceConfigOverwrite: {
SHOW_JITSI_WATERMARK: false,
SHOW_WATERMARK_FOR_GUESTS: false
},
};
const api = new JitsiMeetExternalAPI(domain, options);
api.executeCommands({
email: ‘<?= $USER->getEmail()?>’,
displayName: ‘<?= $USER->GetFullName()?>’
});