Skip to main content

EyesonIframe 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

Options is an object with following parameters:

ParameterTypeDescription
accessKeyString ( or guest.token required)The access key for specific participant
guestObject (optional)Guest token and settings
guest.tokenString ( or accessKey required )Guest token
guest.localeString (optional)UI locale. Can be en, de, fr or ru. Default: browser locale or en
guest.suggestNameBoolean (optional)Suggest a guest name or leave empty. Default: true
isPermalinkBoolean (optional)Use accessKey or guest.token as permalink. Default: false
widthString or Number (optional)Width of iFrame element. Can be any CSS unit like '100vw' or '500px' etc. Number indicates pixel units. Default: '100%'
heightString or Number (optional)Height of iFrame element. Can be any CSS unit like '100vh' or '500px' etc. Number indicates pixel units. Default: '100%'
cssString (optional)Css for the iFrame element. Default 'display:block;width:100%;height:100%;border:none'
titleString (optional)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. Default: 'Eyeson meeting'
classNameString (optional)Class name(s) for the injected iframe element. Default: none
eventsObject (optional)Object with event listeners
info

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

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 on the beginning.

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