DytePlugin
The DytePlugin module represents a single plugin in the meeting.
A plugin can be obtained from one of the plugin arrays in meeting.plugins
.
For example,
const plugin1 = meeting.plugins.active.get(pluginId);
const plugin2 = meeting.plugins.all.get(pluginId);
plugin.roomJoined
Returns true if the local participant has joined the meeting.
plugin.sendIframeEvent(message)
Param | Description |
---|---|
message | Socket message forwarded to this plugin. |
plugin.sendData(payload)
This method is used to send arbitrary data to the plugin.
Param | Description |
---|---|
payload | The payload that you want to send inside the plugin. |
payload.eventName | Name of the event. This is used to listen for the event in plugin SDK. |
payload.data | Data you wish to emit. It can assume any data type. |
plugin.removePluginView(viewId)
This method is used for cleaning up event listeners attached to an iframe. It must be used before the iframe is removed from the DOM.
Param | Default | Description |
---|---|---|
viewId | default | ID of the view corresponding to this iframe. Default is 'default'. |
plugin.addPluginView(iframe, viewId)
This method adds the communcation layer between the plugin inside the iframe and the core application (meeting object) in the main window.
Param | Default | Description |
---|---|---|
iframe | Iframe element to display this plugin. | |
viewId | default | ID of the view corresponding to this iframe. Default is 'default'. |
plugin.activateForSelf()
plugin.deactivateForSelf()
plugin.enable()
Deprecated
plugin.disable()
Deprecated
plugin.activate()
Activate this plugin for all participants.
plugin.deactivate()
Deactivate this plugin for all participants.