IFrame API executeCommand Problem

I wanted to create a room with javascript api and i was successful.
Then i try to put password config, but it was unseccessfull :frowning: . I try this sloution but did’nt worked for me; Lock failed on JitsiMeetExternalAPI
I’ve test this code; api.executeCommand(‘password’, pass);
response; undefined

My main code;

		<script src="https://online.mydomain.com/libs/external_api.min.js"></script>
				const domain = "online.mydomain.com";
				const parentElement = document.getElementById('api-parent');
				console.warn('parentElement', parentElement);
				var options = {
					roomName: "Deneme",
					width: 800,
					height: 600,
					userInfo: {
					email: 'mail@gmail.com',
					displayName: 'Ad Soyad'
					parentNode: parentElement

				var api = new JitsiMeetExternalAPI(domain, options);
				var pass = 'your-room-password';
				function(event) {
					// when host has joined the video conference 
					if (event.role == 'moderator') {
						api.executeCommand('password', pass);
					else {
						setTimeout(() => {
						// why timeout: I got some trouble calling event listeners without setting a timeout :)

							// when local user is trying to enter in a locked room 
							api.addEventListener('passwordRequired', () => {
								api.executeCommand('password', pass);

							// when local user has joined the video conference 
							api.addEventListener('videoConferenceJoined', (response) => {
								setTimeout(function(){ api.executeCommand('password', pass);}, 300);

						}, 10);

Any help :pensive:

You can set the delay time longer. Change from 10 to 5000. Then, it should be fine.