/    Sign up×
Community /Pin to ProfileBookmark

How to keep the video meeting screen from appearing immediately

I am trying to use the Jitsi iFrame API on a web page. Here is the code:

“`
<div id=”meet”></div>
<script>
const options = {
parentNode: document.querySelector(‘#meet’),
width: “100%”,
height: “100%”

}
meetAPI = new JitsiMeetExternalAPI(“meet.jit.si”, options);
</script>
“`

I have the jitsi screen (located at <div id=”meet”></div>) at the bottom of the web page. However, when you visit the page, the bottom of the page immediately appears with the jitsi screen. Why does it do that? If I block the <script>jitsi</script>, it doesn’t do that, the normal top of page appears and you can manually scroll down to the <div id=”meet”></div>, (like you would normally reading a web page from top to bottom). What I’m trying to accomplish is being able to manually scroll down the web page to see the jitsi screen and Start Meeting, if I choose to.

The Jitsi manual shows an onload option:

“The API object constructor uses the following options:
—- etc…..
onload: The IFrame onload event handler.”

Would this help me accomplish what I’m trying to?
If so, can you please provide a possible example of what to use there to remedy this?

“`
const options = {
parentNode: document.querySelector(‘#meet’),
width: “100%”,
height: “100%”,
onload: ?????????
}
“`

Any help is appreciated.

to post a comment
HTMLJavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@daveyerwinJan 22.2021 — @chrisjchrisj#1627027

what you describe is the expected behavior

dont put the iframe in the html

put a button instead

on button click add the iframe to the DOM
Copy linkTweet thisAlerts:
@JennieMillerJan 22.2021 — yes try the 1st comment.
Copy linkTweet thisAlerts:
@chrisjchrisjauthorJan 22.2021 — Thank you for your replies.

Can you provide an example of "on button click add the iframe to the DOM"?

not sure what you're saying there
Copy linkTweet thisAlerts:
@daveyerwinJan 22.2021 — https://www.w3schools.com/jsref/dom_obj_frame.asp
×

Success!

Help @chrisjchrisj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...