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:
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)
Guest token
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.
isPermalink
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
It is required to have either an accessKey or a guest.token.
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"