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

  context | The context information of the extension, see `AgoraExtensionContext`.
  key | The key of the extension.
  value | The 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

  context | The 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

  context | The 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

  context | The context information of the extension, see `AgoraExtensionContext`.
  error | Error code. For details, see the extension documentation provided by the extension provider.
  message | Reason. For details, see the extension documentation provided by the extension provider.