Subscribe to callbacks

This page describes how to attach to the callbacks that are available in the Google Meet Add-ons SDK.

Callbacks allow add-on developers to react to events originating from the Google Meet app. As events arrive, the Meet Add-ons SDK executes the function that the developer registered for a particular event type using the MeetAddonClient.on method.

To attach to a callback, use the on method on the MeetAddonClient. The following callback is available:

  • The AddonCallbacks.frameToFrameMessage callback that executes when the add-on running in one frame sends a message to an add-on running in another frame.

    You can use the following code sample to attach to the callback for a AddonCallbacks.frameToFrameMessage:

    sidePanelClient.on('frameToFrameMessage', (arg: FrameToFrameMessage) => {
        // YOUR_CODE