IMediaExtensionObserver

Extension event callback interface class.

onError

Occurs when the extension runs incorrectly.

void onError(String provider, String extension, int error, String message);

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

Parameters

provider
The name of the extension provider.
extension
The name of the extension.
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.

onEvent

The event callback of the extension.

void onEvent(String provider, String extension, String key, String value);

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

Parameters

provider
The name of the extension provider.
extension
The name of the extension.
key
The key of the extension.
value
The value of the extension key.

onStarted

Occurs when the extension is enabled.

void onStarted(String provider, String extension);

The extension triggers this callback after it is successfully enabled.

Parameters

provider
The name of the extension provider.
extension
The name of the extension.

onStopped

Occurs when the extension is disabled.

void onStopped(String provider, String extension);

The extension triggers this callback after it is successfully destroyed.

Parameters

provider
The name of the extension provider.
extension
The name of the extension.