Skip to content
Cloudflare Docs

RTKPlugin

The RTKPlugin module represents a single plugin in the meeting. A plugin can be obtained from one of the plugin arrays in meeting.plugins. For example,

TypeScript
const plugin1 = meeting.plugins.active.get(pluginId);
const plugin2 = meeting.plugins.all.get(pluginId);

module.exports ⏏

Kind: Exported class

new module.exports(context, plugin, pluginSocketHandler, self, participants, chat, meetingTitle)

ParamType
contextContext
pluginRTKPluginResponse
pluginSocketHandlerRTKPluginSocketHandler
selfSelf
participantsParticipants
chatChat
meetingTitlestring

module.exports.telemetry

Kind: instance property of module.exports

module.exports.sendIframeEvent(message)

Kind: instance method of module.exports

ParamTypeDescription
messageRTKPluginIframeMessageSocket message forwarded to this plugin.

module.exports.handleIframeMessage(iframeMessage)

Kind: instance method of module.exports

ParamType
iframeMessageRTKPluginIframeMessage

module.exports.sendData(payload)

This method is used to send arbitrary data to the plugin.

Kind: instance method of module.exports

ParamTypeDescription
payloadSendDataOptionsThe payload that you want to send inside the plugin.
payload.eventNamestringName of the event. This is used to listen for the event in plugin SDK.
payload.dataanyData you wish to emit. It can assume any data type.

module.exports.removeRTKPluginView(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.

Kind: instance method of module.exports

ParamTypeDefaultDescription
viewIdstring"default"ID of the view corresponding to this iframe. Default is 'default'.

module.exports.addRTKPluginView(iframe, viewId)

This method adds the communcation layer between the plugin inside the iframe and the core application (meeting object) in the main window.

Kind: instance method of module.exports

ParamTypeDefaultDescription
iframeHTMLIFrameElement | ReactNativeWebViewIframe element to display this plugin.
viewIdstring"default"ID of the view corresponding to this iframe. Default is 'default'.

module.exports.setActive(active)

Kind: instance method of module.exports

ParamType
activeboolean

module.exports.activateForSelf()

Kind: instance method of module.exports

module.exports.deactivateForSelf()

Kind: instance method of module.exports

module.exports.enable()

Deprecated

Kind: instance method of module.exports

module.exports.disable()

Deprecated

Kind: instance method of module.exports

module.exports.activate()

Activate this plugin for all participants.

Kind: instance method of module.exports

module.exports.deactivate()

Deactivate this plugin for all participants.

Kind: instance method of module.exports