io.agora.rtc

## Interface IMediaPacketReceiver

-     public interface IMediaPacketReceiver

  Observer interface for media packet receiver events.

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default int` | `onMediaPacketReceived(AgoraMediaPacketReceiver agoraMediaPacketReceiver, byte[] packet, int length, PacketOptions options)` Called when a media packet is received.

- - ### Method Detail

    - #### onMediaPacketReceived

          default int onMediaPacketReceived(AgoraMediaPacketReceiver agoraMediaPacketReceiver,
                                            byte[] packet,
                                            int length,
                                            PacketOptions options)

      Called when a media packet is received.
      Parameters:
        `agoraMediaPacketReceiver` - The media packet receiver instance
        `packet` - Packet data
        `length` - Packet length
        `options` - Packet options
      Returns:
        0 on success, non-zero on failure