JitsiMeetExternalAPI is not defined

The Jitsi iFRame api that I have on my web page won’t show the Start Meeting screen unless I refresh the page.
In dev tools > console it shows:
“JitsiMeetExternalAPI is not defined”
can you help me resolve this, please?

Here is my code:
script src=‘https://meet.jit.si/external_api.js’>

<div id="meeting"></div>

    <script>
    const domain = 'meet.jit.si';
    const options = {
        parentNode: document.querySelector('#meeting'),
        width: "100%",
        height: "100%",
        interfaceConfigOverwrite: { SHOW_CHROME_EXTENSION_BANNER: false },
        configOverwrite: { enableWelcomePage: true },
        };

    const api = new JitsiMeetExternalAPI(domain, options);
    </script>

In dev tools > console it shows:
“JitsiMeetExternalAPI is not defined”
can you help me resolve this, please?

Is your source like jitsi-meet/api.html at master · jitsi/jitsi-meet · GitHub ?

Yes, except my code has this:
‘parentNode: document.querySelector(’#meet’)’
instead of this:
‘parentNode: undefined’
and my code is using ‘const’ instead of ‘var’

Yet, in dev tools > console it shows:
“JitsiMeetExternalAPI is not defined”
can you help me resolve this, please?

I see this: devTools — ImgBB, in browser > developer tools > console, but when I refresh the page, I no longer see that dev tools error. If that’s any help.

Any help is welcomed

@chrisj Have you provided your page a link to external_api.js?

Thanks for your reply. If you mean this:

src=‘https://meet.jit.si/external_api.js’>

the answer is yes, this is on the web page within the <script tags

ScriptLink

@chrisj You could try serving it instead of linking to it.

Thank you for your reply.
Yes, I could put in on my server instead, but, I’m sure someone must have it linked and no ‘not defined’ error. That’s what I’m looking to resolve. Any additional help with that is appreciated

Wait … how are you loading the file? You should always load it from https location, you cannot open the file from your local file system.

Yes, this code <…https://meet.jit.si/external_api.js …> is on an html page, which is part of my web site which is on my web host’s server. So, how can I resolve the “not defined” issue. I can’t seem to get help on that. All I did was follow the jitsi iFrame instructions on not hosting jitsi, and have a “not defined” error. help, please. Is there anywhere else to get jitsi support?

Try posting a sample code that does not work, so somebody to try helping you. Without any non working example, it is impossible to guess what your code looks like … I am always testing with this and it works: jitsi-meet/api.html at master · jitsi/jitsi-meet · GitHub

Thanks for your reply. On line 27 is where the jitsi code begins:

any additional replies/help is welcommed.
Thanks again

Can you move those script tags in the head section of the page and see how it goes.

Thanks for your reply, that resolved the error