Agora RTC Objective-C API Reference  Refactor
Instance Methods
<AgoraMediaFilterEventDelegate> Protocol Reference

Inherits <NSObjectNSObject>.

Instance Methods

(void) - onEventWithContext:key:value:
 
(void) - onExtensionStartedWithContext:
 
(void) - onExtensionStoppedWithContext:
 
(void) - onExtensionErrorWithContext:error:message:
 

Method Documentation

◆ onEventWithContext:key:value:

- (void) onEventWithContext: (AgoraExtensionContext *_Nonnull)  context
key: (NSString *_Nullable)  key
value: (NSString *_Nullable)  value 
optional

The event callback of the extension.

To listen for events while the extension is running, you need to register this callback.

Parameters
contextThe context information of the extension, see AgoraExtensionContext.
keyThe key of the extension.
valueThe value of the extension key.

◆ onExtensionStartedWithContext:

- (void) onExtensionStartedWithContext: (AgoraExtensionContext *_Nonnull)  context
optional

Occurs when the extension is enabled.

The callback is triggered after the extension is successfully enabled.

Parameters
contextThe context information of the extension, see AgoraExtensionContext.

◆ onExtensionStoppedWithContext:

- (void) onExtensionStoppedWithContext: (AgoraExtensionContext *_Nonnull)  context
optional

Occurs when the extension is disabled.

The callback is triggered after the extension is successfully disabled.

Parameters
contextThe context information of the extension, see AgoraExtensionContext.

◆ onExtensionErrorWithContext:error:message:

- (void) onExtensionErrorWithContext: (AgoraExtensionContext *_Nonnull)  context
error: (int)  error
message: (NSString *_Nullable)  message 
optional

Occurs when the extension runs incorrectly.

In case of extension enabling failure or runtime errors, the extension triggers this callback and reports the error code along with the reasons.

Parameters
contextThe context information of the extension, see AgoraExtensionContext.
errorError code. For details, see the extension documentation provided by the extension provider.
messageReason. For details, see the extension documentation provided by the extension provider.