IMetadataObserver
The metadata observer.
You can call RegisterMediaMetadataObserver to register or unregister the IMetadataObserver object.
OnMetadataReceived
Occurs when the local user receives the metadata.
public virtual void OnMetadataReceived(Metadata metadata) { }
Parameters
- metadata
- The metadata received. See Metadata.
OnReadyToSendMetadata
Occurs when the SDK is ready to send metadata.
public virtual bool OnReadyToSendMetadata(ref Metadata metadata, VIDEO_SOURCE_TYPE source_type) { return false; }
This callback is triggered when the SDK is ready to send metadata.
Parameters
- source_type
- Video data type. See VIDEO_SOURCE_TYPE.
- metadata
- The metadata that the user wants to send. See Metadata.
Returns
true
: Send the video frame.false
: Do not send the video frame.
SendMetadata
Sends media metadata.
public abstract int SendMetadata(Metadata metadata, VIDEO_SOURCE_TYPE source_type);
Details
If the metadata is sent successfully, the SDK triggers the OnMetadataReceived callback on the receiver.
Parameters
- metadata
- Media metadata. See Metadata.
- source_type
- The type of the video source. See VIDEO_SOURCE_TYPE.
Returns
- 0: Success.
- < 0: Failure.
SetMaxMetadataSize
Sets the maximum size of the media metadata.
public abstract int SetMaxMetadataSize(int size);
Details
After calling RegisterMediaMetadataObserver, you can call this method to set the maximum size of the media metadata.
Parameters
- size
- The maximum size of media metadata.
Returns
- 0: Success.
- < 0: Failure.