Options
All
  • Public
  • Public/Protected
  • All
Menu

RtmEngine is the entry point of the react native agora rtm sdk. You can call the createClient method of RtmEngine to create an RtmEngine instance.

noinheritdoc

Hierarchy

  • RtmEngine

Index

Constructors

Methods

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • clearLocalUserAttributes(): Promise<void>
  • Returns Promise<void>

  • createClient(appId: string): Promise<void>
  • deprecated

    createInstance supports platform: ios, android This method creates AgoraRTM instance and begin event observing, collect all both remote and local invitations and channels resources. method: createClient

    Parameters

    • appId: string

      string

    Returns Promise<void>

    void

  • createInstance(appId: string): Promise<void>
  • Parameters

    • appId: string

    Returns Promise<void>

  • Parameters

    • calleeId: string
    • Optional content: string
    • Optional channelId: string

    Returns Promise<<internal>.LocalInvitation>

  • deleteChannelAttributesByKeys(channelId: string, attributeKeys: string[], option: ChannelAttributeOptions): Promise<void>
  • Parameters

    Returns Promise<void>

  • deleteLocalUserAttributesByKeys(attributeKeys: string[]): Promise<void>
  • Parameters

    • attributeKeys: string[]

    Returns Promise<void>

  • destroyClient(): Promise<void>
  • deprecated

    release supports platform: ios, android This method destroy AgoraRTM instance, stop event observing, release all both remote and local invitaitons and channels resources.

    Returns Promise<void>

    void

  • Parameters

    • channelId: string

    Returns Promise<<internal>.RtmChannelAttribute[]>

  • Parameters

    • channelId: string
    • attributeKeys: string[]

    Returns Promise<<internal>.RtmChannelAttribute[]>

  • getChannelMembersBychannelId(channelId: string): Promise<Members>
  • Parameters

    • channelId: string

    Returns Promise<<internal>.RtmChannelMember[]>

  • deprecated

    get the version of rtm sdk

    Parameters

    • callback: Callback

      (version) => {} required

    Returns void

  • Parameters

    • userId: string

    Returns Promise<<internal>.RtmAttribute[]>

  • Parameters

    • userId: string
    • attributeKeys: string[]

    Returns Promise<<internal>.RtmAttribute[]>

  • getUserAttributesByUid(uid: string): Promise<UserProfile>
  • deprecated

    getUserAttributes supports platform: ios, android This method enables you get user attributes by uid.

    Parameters

    • uid: string

      string. user id

    Returns Promise<UserProfile>

    Promise UserProfile

  • joinChannel(channelId: string): Promise<void>
  • supports platform: ios, android This method do join channel with channelId

    Parameters

    • channelId: string

      string

    Returns Promise<void>

    Promise

  • leaveChannel(channelId: string): Promise<void>
  • supports platform: ios, android This method do leave channel with channelId

    Parameters

    • channelId: string

      string

    Returns Promise<void>

    Promise

  • deprecated

    loginV2 supports platform: ios, android This method do login with UserInfo

    Parameters

    Returns Promise<void>

    Promise

  • loginV2(userId: string, token?: string): Promise<void>
  • Parameters

    • userId: string
    • Optional token: string

    Returns Promise<void>

  • logout(): Promise<void>
  • supports platform: ios, android This method do logout.

    Returns Promise<void>

    Promise

  • on<EventName>(eventName: EventName, callback: RtmEngineEvents[EventName]): void
  • deprecated

    addListener supports platform: ios, android

    events

    RtmEngineEvents

    Type parameters

    Parameters

    • eventName: EventName

      string required

    • callback: RtmEngineEvents[EventName]

      (evt) => {} required

    Returns void

  • queryPeersBySubscriptionOption(option: ONLINE): Promise<string[]>
  • Parameters

    Returns Promise<string[]>

  • Parameters

    • peerIds: string[]

    Returns Promise<<internal>.PeersOnlineStatus>

  • Parameters

    Returns Promise<void>

  • release(): Promise<void>
  • Returns Promise<void>

  • releaseChannel(channelId: string): Promise<void>
  • Parameters

    • channelId: string

    Returns Promise<void>

  • removeAllListeners<EventType>(event?: EventType): void
  • Type parameters

    Parameters

    • Optional event: EventType

    Returns void

  • removeAllLocalUserAttributes(): Promise<void>
  • deprecated

    clearLocalUserAttributes supports platform: ios, android This method enables you to remove all of local user attributes;

    Returns Promise<void>

    Promise

  • removeEvents(): void
  • Returns void

  • removeLocalUserAttributesByKeys(keys: string[]): Promise<void>
  • deprecated

    deleteLocalUserAttributesByKeys supports platform: ios, android This method enables you to remove exists attribute for local user.

    Parameters

    • keys: string[]

      string []

    Returns Promise<void>

    Promise

  • renewToken(token: string): Promise<void>
  • supports platform: ios, android This method do renewToken when got tokenExpired event.

    Parameters

    • token: string

      string

    Returns Promise<void>

    Promise

  • replaceLocalUserAttributes(attributes: UserAttribute[]): Promise<void>
  • deprecated

    addOrUpdateLocalUserAttributes supports platform: ios, android This method enables you to replace attribute already exists or add attribute wasn't set for local user attributes;

    Parameters

    Returns Promise<void>

    Promise

  • Parameters

    Returns Promise<void>

  • sendMessageByChannelId(channelId: string, text: string): Promise<void>
  • deprecated

    sendMessage supports platform: ios, android This method enables send message by channel id. NOTICE: text bytelength has MAX_SIZE 32kb limit.

    Parameters

    • channelId: string

      string.

    • text: string

      string (bytesize shouldn't >= 32kb)

    Returns Promise<void>

    Promise

  • setLocalUserAttributes(attributes: UserAttribute[]): Promise<void>
  • Parameters

    Returns Promise<void>

  • setLogFile(filePath: string): Promise<void>
  • Parameters

    • filePath: string

    Returns Promise<void>

  • setLogFileSize(fileSizeInKBytes: number): Promise<void>
  • Parameters

    • fileSizeInKBytes: number

    Returns Promise<void>

  • setLogFilter(filter: LogLevel): Promise<void>
  • Parameters

    Returns Promise<void>

  • setParameters(parameters: string): Promise<void>
  • Parameters

    • parameters: string

    Returns Promise<void>

  • setSdkLog(path: string, level: LogLevel, size: number): Promise<void>
  • deprecated

    setLogFile setLogFilter setLogFileSize set sdk log file

    Parameters

    • path: string

      string: specified the generated log path

    • level: LogLevel

      LogLevel: sdk log level (0: "OFF", 0b1111: "INFO", 0b1110: "WARN", 0b1100: "ERROR", 0b1000: "CRITICAL")

    • size: number

      number: file size in kbytes Note File size settings of less than 512 KB or greater than 10 MB will not take effect.

    Returns Promise<void>

    Promise This method will return {path: boolean, level: boolean, size: boolean}

  • subscribePeersOnlineStatus(peerIds: string[]): Promise<void>
  • Parameters

    • peerIds: string[]

    Returns Promise<void>

  • unsubscribePeersOnlineStatus(peerIds: string[]): Promise<void>
  • Parameters

    • peerIds: string[]

    Returns Promise<void>

  • getSdkVersion(): Promise<string>
  • Returns Promise<string>

Generated using TypeDoc