Agora Interactive Whiteboard Java API Reference
Public Member Functions | List of all members
com.herewhite.sdk.CommonCallback Interface Reference
Inheritance diagram for com.herewhite.sdk.CommonCallback:
com.herewhite.sdk.CommonCallbacks com.herewhite.sdk.AbstractCommonCallbacks

Public Member Functions

default void throwError (Object args)
 
default String urlInterrupter (String sourceUrl)
 
default void onPPTMediaPlay ()
 
default void onPPTMediaPause ()
 
default void onMessage (JSONObject object)
 
default void sdkSetupFail (SDKError error)
 
default void onLogger (JSONObject object)
 

Detailed Description

The RoomCallbacks interface, which the SDK uses to send callback event notifications to the application.

The Room instance can inherit the methods of this interface.

Since
2.9.13

Member Function Documentation

◆ throwError()

default void com.herewhite.sdk.CommonCallback.throwError ( Object  args)

Reports an uncaught global error during SDK runtime.

Parameters
argsError message.

Implemented in com.herewhite.sdk.AbstractCommonCallbacks.

◆ urlInterrupter()

default String com.herewhite.sdk.CommonCallback.urlInterrupter ( String  sourceUrl)

Occurs when the SDK intercepts an image URL address.

Since
2.9.14

By default, this callback is disabled. You can enable it by calling setEnableInterrupterAPI(true) when initializing the WhiteSdk instance. Once this callback is enabled and users insert an image into the whiteboard scene, the SDK triggers this callback, which reports the original URL address of the image. You can replace the original URL address with a specified URL address in this callback.

Note
Agora does not recommend enabling this callback because the SDK triggers this callback too frequently when it is enabled.
Parameters
sourceUrlThe original URL address of an image.
Returns
The URL address that you specify to replace the original one. Ensure that you set the return value.

Implemented in com.herewhite.sdk.AbstractCommonCallbacks.

◆ onPPTMediaPlay()

default void com.herewhite.sdk.CommonCallback.onPPTMediaPlay ( )

Occurs when the audio and video in dynamic PPT slides start playing.

Since
2.9.13

◆ onPPTMediaPause()

default void com.herewhite.sdk.CommonCallback.onPPTMediaPause ( )

Occurs when the audio and video in dynamic PPT slides pause playing.

Since
2.9.13

Implemented in com.herewhite.sdk.AbstractCommonCallbacks.

◆ onMessage()

default void com.herewhite.sdk.CommonCallback.onMessage ( JSONObject  object)

Occurs when the user receives a message from the web page.

Since
2.11.4

The SDK triggers the callback when the local user receives a message sent by a web page (such as the iframe plug-in and PPTX).

Note
Not all users can receive this callback.
Parameters
objectMessage in JSON format. Only when the message is in JSON format can the local user receive it.

Implemented in com.herewhite.sdk.AbstractCommonCallbacks.

◆ sdkSetupFail()

default void com.herewhite.sdk.CommonCallback.sdkSetupFail ( SDKError  error)

Reports the failure of the SDK initialization.

Since
2.9.14

You must initialize a WhiteSdk instance before calling any other APIs. You can try reinitializing the SDK.

The SDK initialization failure may be due to the following reasons:

  • Failure to obtain configuration information due to network connection issues.
  • The specified App Identifier is invalid.
Parameters
errorError message.

Implemented in com.herewhite.sdk.AbstractCommonCallbacks.

◆ onLogger()

default void com.herewhite.sdk.CommonCallback.onLogger ( JSONObject  object)

Gets the local debug logs output by the SDK.

Since
2.13.22

After you successfully call setLog(true), the SDK triggers this callback to send you the local debug logs.

If you need to disable this callback, call setLog(false).

Note
After you call setLog(false), the SDK stops sending you the local debug logs through this callback, but still triggers this callback to send the logs related to video-js-plugin.
Parameters
objectLog messages in JSON object format. Each log message contains the following keys:
  • funName: The function name.
  • params: Detailed parameter settings.

For example, {"funName": "joinRoom", "params": {"isWritable": 1, "region": "us-sv"}}.