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:
Parameter | Type | Description |
---|---|---|
accessKey | String ( or guest.token required) | The access key for specific participant |
guest | Object (optional) | Guest token and settings |
guest.token | String ( or accessKey required ) | Guest token |
guest.locale | String (optional) | UI locale. Can be en , de , fr or ru . Default: browser locale or en |
guest.suggestName | Boolean (optional) | Suggest a guest name or leave empty. Default: true |
isPermalink | Boolean (optional) | Use accessKey or guest.token as permalink. Default: false |
width | String or Number (optional) | Width of iFrame element. Can be any CSS unit like '100vw' or '500px' etc. Number indicates pixel units. Default: '100%' |
height | String or Number (optional) | Height of iFrame element. Can be any CSS unit like '100vh' or '500px' etc. Number indicates pixel units. Default: '100%' |
css | String (optional) | Css for the iFrame element. Default 'display:block;width:100%;height:100%;border:none' |
title | String (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' |
className | String (optional) | Class name(s) for the injected iframe element. Default: none |
events | Object (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"