livelike logo
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

addChatRoomEventListener

  • addChatRoomEventListener<_Event, _EventListener>(chatRoomEvent: _Event, listenerFn: _EventListener, options: IChatRoomEventListenerOptions): Promise<void>
  • description

    Add listener for the given ChatRoomEvent, pass options based on the events

    since

    2.12.0

    example
    addChatRoomEventListener(ChatRoomEvent.INVITE_NEW_MEMBER, function onReceieveChatRoomInvitationListener(invitationEvent){
    console.log(invitation);
    })
    // for adding Invite new member event listener
    addChatRoomEventListener(ChatRoomEvent.INVITE_NEW_MEMBER, function onReceieveChatRoomInvitationListener(invitationEvent){
    console.log(invitation);
    })
    // for adding pin message event listener
    addChatRoomEventListener(
    ChatRoomEvent.PIN_MESSAGE,
    function onReceivedPinMessageListener (pinMessageInfoEvent) { console.log(pinMessageInfoEvent)},
    { roomId: "695ea6f4-fe7b-47cc-817c-2d73fdba264a" }
    );

    Type parameters

    Parameters

    Returns Promise<void>

removeChatRoomEventListener

  • removeChatRoomEventListener<_Event, _EventListener>(chatRoomEvent: _Event, listenerFn: _EventListener, options: IChatRoomEventListenerOptions): Promise<void>
  • description

    Remove registered listenerFn for the given ChatRoomEvent, pass options based on the events when no listener passed, all registered event listener will be removed

    since

    2.12.0

    example
    // for removing Invite new member event listener
    removeChatRoomEventListener(ChatRoomEvent.INVITE_NEW_MEMBER, onReceieveChatRoomInvitationListener);
    // for removing pin message event listener
    removeChatRoomEventListener(
    ChatRoomEvent.PIN_MESSAGE,
    onReceivedPinMessageListener,
    { roomId: "695ea6f4-fe7b-47cc-817c-2d73fdba264a" }
    );

    Type parameters

    Parameters

    Returns Promise<void>

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Enumeration

Generated using TypeDoc