Options
All
  • Public
  • Public/Protected
  • All
Menu

Remota main class, returned when the Remota.agent/host is called. It enables developers to listen to important events, such as when users joined, session control requests and changes and so on.

Hierarchy

  • Manager

Index

Methods

acceptControlChange

  • acceptControlChange(user: User): void
  • Accept a control change (uses replyControlChangeRequest)

    Parameters

    Returns void

close

  • close(): void

denyControlChange

  • denyControlChange(): void
  • Deny control change (uses replyControlChangeRequest)

    Returns void

onClose

  • onClose(cb: () => void): void
  • Listen the Remota manager close events. Can be used to alert the user in case the session was ended (when close() is called)

    Parameters

    • cb: () => void
        • (): void
        • Returns void

    Returns void

onConnect

  • onConnect(cb: () => void): void
  • Listen to events triggered by when it gets connected to Remota server. This can be used to change UI state.

    Parameters

    • cb: () => void
        • (): void
        • Returns void

    Returns void

onControlChangePrompt

  • Listen to events when there is a control change request from the server. Developers should use this to prompt the user to confirm/deny the control change.

    Parameters

    Returns void

onControlUpdate

  • Listen to events when there is a change control request from the UI. This is used to forward to the Remota server, but can as well be used to change UI state.

    Parameters

    Returns void

onError

  • onError(cb: (e: Error) => void): void
  • Listen to error events within the manager. Can be used to log errors or show error messages.

    Parameters

    • cb: (e: Error) => void
        • (e: Error): void
        • Parameters

          • e: Error

          Returns void

    Returns void

requestControlChange

  • requestControlChange(): void

revokeControl

  • revokeControl(): void
  • Revoke control from agent (only host can trigger)

    Returns void

start

  • Start listening to events and set socket handlers. In the future, the socket connection will be started here as well.

    Returns Manager

Generated using TypeDoc