Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InvisiblePlugin<A>

Description of invisible plugins.

since

2.10.0

Agora supports two kinds of custom plugins: component plugins and invisible plugins. Note that:

  • An invisible plugin is a global and unique variable in a room; it can have one object only.
  • An invisible plugin is not visible on the whiteboard view, but its attributes are automatically synchronized in the room.

Type parameters

  • A: Object

Hierarchy

  • InvisiblePlugin

Index

Constructors

constructor

Properties

attributes

attributes: A

Attributes of the invisible plugin.

callbacks

Event callbacks of the invisible plugin.

displayer

displayer: Displayer

The Displayer object of the invisible plugin.

Methods

destroy

  • destroy(): void

getAttributesValue

  • getAttributesValue(key: string[] | string): any
  • Gets the value of one or more attributes of the invisible plugin.

    since

    2.13.7

    Parameters

    • key: string[] | string

      The key of the attribute.

    Returns any

onAttributesUpdate

  • onAttributesUpdate(attributes: A): void
  • Occurs when the attributes of the invisible plugin are updated.

    Parameters

    • attributes: A

      The updated attributes.

    Returns void

onDestroy

  • onDestroy(): void
  • Occurs when the invisible plugin is deleted.

    Returns void

setAttributes

  • setAttributes(modifyAttributes: Partial<A>): void
  • Sets the attributes of the invisible plugin.

    Parameters

    • modifyAttributes: Partial<A>

      The attributes of the invisible plugin.

    Returns void

updateAttributes

  • updateAttributes(keys: string | string[], value: any): void
  • Updates one or more attributes of the invisible plugin.

    since

    2.13.7

    Parameters

    • keys: string | string[]

      The key of the attribute.

    • value: any

      The value of the attribute.

    Returns void