Voice SDK v3.7.1 API Reference for Unity
|
Inherits agora_gaming_rtc.IMetadataObserver.
Public Member Functions |
|
delegate void | OnMediaMetaDataReceivedHandler (Metadata metadata) |
delegate bool | OnReadyToSendMetadataHandler (ref Metadata metadata) |
delegate int | OnGetMaxMetadataSizeHandler () |
override int | RegisterMediaMetadataObserver (METADATA_TYPE metaDataType) |
override int | UnRegisterMediaMetadataObserver () |
The definition of MetadataObserver.
delegate int agora_gaming_rtc.MetadataObserver.OnGetMaxMetadataSizeHandler | ( | ) |
Occurs when the SDK requests the maximum size of the metadata.
The metadata includes the following parameters:
uid
: The ID of the user who sent the metadata.size
: The buffer size of the sent or received metadata.buffer
: The buffer address of the sent or received metadata.timeStampMs
: Time statmp of the frame following the metadata.The SDK triggers this callback after you successfully call the RegisterMediaMetadataObserver method. You need to specify the maximum size of the metadata in the return value of this callback.
OnGetMaxMetadataSizeHandler
returns 1024, which is the default maximum
size of the metadata.
delegate void agora_gaming_rtc.MetadataObserver.OnMediaMetaDataReceivedHandler | ( | Metadata | metadata | ) |
Occurs when the local user receives the metadata.
metadata | The received Metadata. |
delegate bool agora_gaming_rtc.MetadataObserver.OnReadyToSendMetadataHandler | ( | ref Metadata | metadata | ) |
Occurs when the SDK is ready to receive and send metadata.
metadata | The Metadata to be sent. |
override int agora_gaming_rtc.MetadataObserver.RegisterMediaMetadataObserver | ( | METADATA_TYPE | metaDataType | ) |
Registers a metadata observer.
You need to implement the MetadataObserver class and specify the metadata type in this method. A successful call of this method triggers the OnGetMaxMetadataSizeHandler callback. This method enables you to add synchronized metadata in the video stream for more diversified interactive live streaming interactions, such as sending shopping links, digital coupons, and online quizzes.
metaDataType |
See
METADATA_TYPE. The SDK supports VIDEO_METADATA(0) only for now.
|
override int agora_gaming_rtc.MetadataObserver.UnRegisterMediaMetadataObserver | ( | ) |
UnRegisters the metadata observer.