How to use IFrame API

How i can use IFrame API for jitsi self-hosting.
I try using IFrame API but it not working.
image

So i need help.

1 Like

Hello,

i found this in community maybe we can use like this

Have you read the docs? IFrame API | Jitsi Meet

Here’s an example HTML to help you get started:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test Meet</title>
    <!-- change domain to match your Jitsi server -->
    <script src='https://meet.jit.si/external_api.js'></script>
    <style>
        html {
            overflow: auto;
        }

        html,
        body,
        div,
        iframe {
            margin: 0;
            padding: 0;
            height: 100%;
            border: none;
        }

    </style>
</head>
<body>
<div id='meet'></div>

<script>
    const domain = 'meet.jit.si';  // change domain to match your Jitsi server
    const options = {
        roomName: 'AUniqueMeetingRoomName',
        parentNode: document.querySelector('#meet'),
    };
    const api = new JitsiMeetExternalAPI(domain, options);
</script>
</body>
</html>

Can i use IFrame API in jitsi source code?

No. As you see in the example above, the IFrame allows you to embed a view of an existing jitsi deployed into an HTML page. It is not something used to build jitsi itself.

image
I try this but it is not work:
image

Does not work how? Is the IFrame not loading? Were you not able to join the meeting? Are are you just not getting the answer you expect?

If you’re expecting to see the number of participants there, that probably won’t work if it is being triggered too soon.

Perhaps try listening to videoConferenceJoined event and only query for participants once room is successfully joined. Example:

api.addListener('videoConferenceJoined', () => {
  console.log('Total participants: ' + api.getNumberOfParticipants());
});

I did it. Thank you.