Options
All
  • Public
  • Public/Protected
  • All
Menu

The RcvEngine class is the entry point of the RingCentral video client SDK that empowers the applications to easily and quickly build real-time audio and video communication.

Hierarchy

Index

Constructors

Methods

  • Authorizes the users to obtain the authentication tokens through the password or JWT flow.

    Parameters

    Returns Promise<ErrorCodeType>

  • destroy(): void
  • Destroys the RcvEngine instance and releases all resources used by the client SDK.

    description

    Once you called destory method, you cannot use any method or callback in the client SDK anymore. If you want to do the real-time communication again, you must call create method to create a new RcvEngine instance.

    Returns void

  • Gets an active meeting controller with a specific meeting id.

    description

    The RcvMeetingController instance only returns when you joined a meeting successfully. By using this instance, the app can invoke the meeting methods, such as gets the meeting information, lock and unlock the meeting if you are the meeting host or moderator.

    Returns MeetingController

    The MeetingController instance if success

  • getSettingController(): SettingController
  • Gets the preference controller.

    Returns SettingController

    The PreferenceController instance.

  • Joins a meeting with a specific meeting id.

    description

    Users must have a valid authentication token to invoke this method.

    Parameters

    • meetingId: string

      The meeting short id

    • options: MeetingOptions = {}

      The user-level meeting options.

    Returns Promise<MeetingController>

    The MeetingController instance

  • Removes the specified listener from the listener array for the event named eventName.

    Parameters

    Returns void

  • Adds the listener function to the end of the listeners array for the event named eventName.

    Parameters

    Returns TUnsubscribeFunction

    off function handler

  • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

    Parameters

    Returns void

  • registerModule(modules: { e2ee?: any; vbg?: any }): void
  • Registers and dynamically imports a module to facilitate code splitting in the final build product.

    This function is used to register a module and load it dynamically when needed, enabling code splitting to optimize the final build by only including necessary modules.

    Parameters

    • modules: { e2ee?: any; vbg?: any }
      • Optional e2ee?: any
      • Optional vbg?: any

    Returns void

  • Refreshes the auth token pair immediately.

    Parameters

    • Optional refreshToken: string

      The authentication refresh token string.

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • requestDevicesPermissions(constraints?: MediaStreamConstraints): Promise<ErrorCodeType>
  • Request permission for getting audio and video device.

    Parameters

    • constraints: MediaStreamConstraints = ...

      The permission parameters.

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • setAuthToken(tokenJsonStr: string, autoRefresh?: boolean): Promise<ErrorCodeType>
  • Sets the token pair string in the SDK.

    Parameters

    • tokenJsonStr: string

      The authentication access token and refresh token pair JSON string

    • autoRefresh: boolean = true

      Default value is TRUE. If it's TRUE, the access token will be refreshed automatically once it expired

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • setLocalAudioProcessor(arg: ((stream: MediaStream) => MediaStream)): void
  • Sets the local audio processor. By implementing the local audio processor, the application can receive audio raw data from the client SDK and can apply processing algorithm on its own.

    Parameters

    • arg: ((stream: MediaStream) => MediaStream)
        • (stream: MediaStream): MediaStream
        • Parameters

          • stream: MediaStream

          Returns MediaStream

    Returns void

  • setLocalVideoProcessor(arg: ((stream: MediaStream) => MediaStream)): void
  • Sets the local video processor. By implementing the local video processor, the application can receive YUV raw data from the client SDK and can apply processing algorithm on its own.

    Parameters

    • arg: ((stream: MediaStream) => MediaStream)
        • (stream: MediaStream): MediaStream
        • Parameters

          • stream: MediaStream

          Returns MediaStream

    Returns void

  • Starts an instant meeting with customized meeting-level settings for the participants and user-level meeting options.

    description

    Users must have a valid authentication token to invoke this method.

    Parameters

    • Optional settings: InstantMeetingSettings

      The custom meeting settings, the default settings will be applied if it's null.

    Returns Promise<MeetingController>

    The MeetingController instance

  • unRegisterModule(modules: { e2ee?: any; vbg?: any }): void
  • Unregisters a previously registered module, allowing for removal and cleanup.

    This function is used to unregister a module that was previously registered with 'registerModule'. Unregistering a module is essential for code cleanup and resource management in dynamic module loading scenarios.

    Parameters

    • modules: { e2ee?: any; vbg?: any }
      • Optional e2ee?: any
      • Optional vbg?: any

    Returns void

  • downloadLogs(levels?: LogLevel[]): Promise<void>
  • download logs from rcvEngine

    Parameters

    • Optional levels: LogLevel[]

      download log levels

    Returns Promise<void>

  • Returns the RcvEngine singleton instance.

    Returns undefined | RcvEngine

    The engine instance if success or undefined otherwise