Package io.agora.rtc2

Interface IMetadataObserver


public interface IMetadataObserver
The definition of IMetadataObserver.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    (Not supported) The metadata type is unknown.
    static final int
    The metadata type is video.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Occurs when the SDK requests the maximum size of the metadata.
    void
    Occurs when the local user receives the metadata.
    byte[]
    onReadyToSendMetadata(long timeStampMs, int sourceType)
    Occurs when the SDK is ready to receive and send metadata.
  • Field Details

    • UNKNOWN_METADATA

      static final int UNKNOWN_METADATA
      (Not supported) The metadata type is unknown.
      See Also:
    • VIDEO_METADATA

      static final int VIDEO_METADATA
      The metadata type is video.
      See Also:
  • Method Details

    • getMaxMetadataSize

      int getMaxMetadataSize()
      Occurs when the SDK requests the maximum size of the metadata. The Metadata struct contains the following parameters: - `uid`: ID of the user who sends the metadata.
      Returns:
      The maximum size of the buffer of the metadata that you want to use. The highest value is 1024 bytes. Ensure that you set the return value.
    • onReadyToSendMetadata

      byte[] onReadyToSendMetadata(long timeStampMs, int sourceType)
      Occurs when the SDK is ready to receive and send metadata. You need to specify the metadata in the return value of this callback.
      Parameters:
      timeStampMs - The NTP timestamp (ms) that the metadata sends.
      sourceType - VideoSourceType
      Returns:
      The metadata that you want to send in the format of byte[]. Ensure that you set the return value.
    • onMetadataReceived

      void onMetadataReceived(AgoraMetadata metadata)
      Occurs when the local user receives the metadata.
      Parameters:
      metadata - The metadata. See AgoraMetadata.