WhiteCommonCallbackDelegate Protocol Reference

Conforms to NSObject
Declared in WhiteCommonCallbacks.h

Overview

Whiteboard common callbacks. The SDK sends callback event notifications to the application.

– throwError:

Reports an uncaught global error during SDK runtime.

- (void)throwError:(NSError *)error

Parameters

error

An error message.

Declared In

WhiteCommonCallbacks.h

– urlInterrupter:

Occurs when the SDK intercepts an image URL address.

- (NSString *)urlInterrupter:(NSString *)url

Parameters

url

The original URL address of an image.

Return Value

The URL address that you specify to replace the original one. Ensure that you set the return value.

Discussion

Note:

  • To trigger this callback, you must set enableInterrupterAPI(YES) to enable the image interception replacement function when initializing the whiteboard SDK. See WhiteSdkConfiguration for details.
  • After the picture interception and replacement function is enabled, the callback will be triggered when a picture or scene is inserted into the whiteboard.

Declared In

WhiteCommonCallbacks.h

– pptMediaPlay

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

- (void)pptMediaPlay

Declared In

WhiteCommonCallbacks.h

– pptMediaPause

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

- (void)pptMediaPause

Declared In

WhiteCommonCallbacks.h

– sdkSetupFail:

Reports the failure of the SDK initialization.

- (void)sdkSetupFail:(NSError *)error

Parameters

error

An error message.

Availability

2.9.13

You must initialize a WhiteSDK object 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.

Declared In

WhiteCommonCallbacks.h

– customMessage:

Reports the message sent by the webpage.

- (void)customMessage:(NSDictionary *)dict

Parameters

dict

Message in dictionary format. Only when the message is in dictionary format, the local user can receive it.

Discussion

  • Iframe data in dictionary format
  • Image loading failure message
  • PPT play/pause callback information

This callback is triggered when a local user receives a message sent by a web page (such as iframe plug-in, dynamic PPT).

Declared In

WhiteCommonCallbacks.h

– logger:

Gets the local debug logs output by the SDK.

- (void)logger:(NSDictionary *)dict

Parameters

dict

Log messages in dict 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"}}.

Availability

v2.13.19

After you successfully call log (YES) in WhiteSdkConfiguration, the SDK triggers this callback to send you the local debug logs.

If you need to disable this callback, call log (NO) in WhiteSdkConfiguration.

Declared In

WhiteCommonCallbacks.h

– startRecoveringFromMemoryIssues

Reports that the SDK tries to recover.

- (void)startRecoveringFromMemoryIssues

Discussion

Called when the SDK crashes due to insufficient memory.

Currently, only real-time rooms can trigger this callback. This callback is triggered a maximum of three times per crash.

Declared In

WhiteCommonCallbacks.h

– endRecoveringFromMemoryIssues:

Reports that the SDK finishes a recovery.

- (void)endRecoveringFromMemoryIssues:(BOOL)success

Parameters

success

Whether the recovery is successful.

Discussion

Called when the SDK crashes due to insufficient memory and then finishes one recovery.

If the recovery fails, the SDK does not automatically retry.

Declared In

WhiteCommonCallbacks.h