Skip to main content

Constructor

The constructor takes container and options parameter. Both are required.

const meeting = new EyesonIframe(container, options);

Container can be a Node, HTMLElement, String selector like main > section:nth-of-type(2) or #meeting, or just the id of an element like meeting.

Options​

warning

It is required to have either an accessKey or a guest.token.

Options is an object with following parameters:

accessKey​

Type: STRING or guest.token (required)
The ACCESS_KEY for specific participant

guest​

Type: OBJECT (optional)
Guest token and settings

guest.token​

Type: STRING or accessKey (required)
The GUEST_TOKEN to invite a user.

guest.locale​

Type: STRING (optional)
Default: browser locale or en
UI locale. Valid values are en, de, fr or ru.

guest.suggestName​

Type: BOOLEAN (optional)
Default: true
Suggest a guest name or leave empty.

Type: BOOLEAN (optional)
Default: false
Use accessKey or guest.token as permalink.

width​

Type: STRING or NUMBER (optional)
Default: '100%'
Width of iframe element. Can be any CSS unit like '100vw' or '500px' etc. Number indicates pixel units.

height​

Type: STRING or NUMBER (optional)
Default: '100%'
Height of iframe element. Can be any CSS unit like '100vh' or '500px' etc. Number indicates pixel units.

css​

Type: STRING (optional)
Default: 'display:block;width:100%;height:100%;border:none'
Css for the iframe element.

title​

Type: STRING (optional)
Default: 'Eyeson meeting'
Title for the iframe element. It can be added to the iFrame tag to describe the contents of the frame to people using assistive technology.

className​

Type: STRING (optional)
Default: none
Class name(s) for the injected iFrame element.

events​

Type: OBJECT (optional)
Object with event listeners

theme​

Type: STRING (optional)
Theme to start the Prebuilt-UI with. Can be light or dark.

note

Since version 1.2.0, IFrame API supports Permalink API. Use the permalink user-token as accessKey or the permalink guest-token as guest.token and set options isPermalink=true.

Error​

new EyesonIframe() can throw a TypeError with one of the following messages

'Invalid container element or selector'
'Missing options object'
'Missing access key or guest token'

Status​

Status is set to init at the beginning.

const meeting = new EyesonIframe(...);
console.log(meeting.status); // "init"