Inherits agora_gaming_rtc.IMetadataObserver.
The definition of MetadataObserver.
◆ OnMediaMetaDataReceivedHandler()
delegate void agora_gaming_rtc.MetadataObserver.OnMediaMetaDataReceivedHandler |
( |
Metadata |
metadata | ) |
|
Occurs when the local user receives the metadata.
- Parameters
-
◆ OnReadyToSendMetadataHandler()
delegate bool agora_gaming_rtc.MetadataObserver.OnReadyToSendMetadataHandler |
( |
ref Metadata |
metadata | ) |
|
Occurs when the SDK is ready to receive and send metadata.
- Note
- Ensure that the size of the metadata does not exceed the value set in the OnGetMaxMetadataSizeHandler callback.
- Parameters
-
- Returns
- true: Send.
- false: Do not send.
◆ OnGetMaxMetadataSizeHandler()
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.
- Returns
- The maximum size of the buffer of the metadata that you set. The highest value is 1024 bytes. Ensure that you set the return value, if not,
OnGetMaxMetadataSizeHandler
returns 1024, which is the default maximum size of the metadata.
◆ GetInstance()
◆ releaseInstance()
static void agora_gaming_rtc.MetadataObserver.releaseInstance |
( |
| ) |
|
|
static |
◆ SetEngine()
void agora_gaming_rtc.MetadataObserver.SetEngine |
( |
IRtcEngine |
irtcEngine | ) |
|
◆ RegisterMediaMetadataObserver()
override int agora_gaming_rtc.MetadataObserver.RegisterMediaMetadataObserver |
( |
METADATA_TYPE |
metaDataType | ) |
|
|
virtual |
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.
- Note
- Call this method before the JoinChannelByKey method.
- This method applies to the Live-broadcast channel profile.
- Parameters
-
metaDataType | See METADATA_TYPE. The SDK supports VIDEO_METADATA(0) only for now. |
- Returns
- 0: Success.
- < 0: Failure.
Implements agora_gaming_rtc.IMetadataObserver.
◆ UnRegisterMediaMetadataObserver()
override int agora_gaming_rtc.MetadataObserver.UnRegisterMediaMetadataObserver |
( |
| ) |
|
|
virtual |
◆ defaultMaxMetaDataSize
const int agora_gaming_rtc.MetadataObserver.defaultMaxMetaDataSize = 1024 |
|
static |
◆ _OnMediaMetaDataReceived
◆ _OnReadyToSendMetadata
◆ _OnGetMaxMetadataSize
◆ _metaDataObserver
The documentation for this class was generated from the following file: