Inherits agora_gaming_rtc.IPacketObserver.
The definition of
PacketObserver.
◆ OnReceiveAudioPacketHandler()
delegate bool agora_gaming_rtc.PacketObserver.OnReceiveAudioPacketHandler
|
( |
Packet
|
packet |
) |
|
Occurs when the local user receives an audio packet.
- Parameters
-
packet |
The received audio packet. See
Packet.
|
- Returns
-
- true: The audio packet is received successfully.
- false: The audio packet is discarded.
◆ OnReceiveVideoPacketHandler()
delegate bool agora_gaming_rtc.PacketObserver.OnReceiveVideoPacketHandler
|
( |
Packet
|
packet |
) |
|
Occurs when the local user receives a video packet.
- Parameters
-
packet |
The received video packet. See
Packet.
|
- Returns
-
- true: The video packet is received successfully.
- false: The video packet is discarded.
◆ OnSendAudioPacketHandler()
delegate bool agora_gaming_rtc.PacketObserver.OnSendAudioPacketHandler
|
( |
Packet
|
packet |
) |
|
Occurs when the local user sends an audio packet.
- Parameters
-
packet |
The sent audio packet. See
Packet.
|
- Returns
-
- true: The audio packet is sent successfully.
- false: The audio packet is discarded.
◆ OnSendVideoPacketHandler()
delegate bool agora_gaming_rtc.PacketObserver.OnSendVideoPacketHandler
|
( |
Packet
|
packet |
) |
|
Occurs when the local user sends a video packet.
- Parameters
-
packet |
The sent video packet. See
Packet.
|
- Returns
-
- true: The video packet is sent successfully.
- false: The video packet is discarded.
◆ RegisterPacketObserver()
override int agora_gaming_rtc.PacketObserver.RegisterPacketObserver
|
( |
|
) |
|
Registers a packet observer.
The Agora RTC SDK allows your application to register a packet observer to receive
callbacks for voice or video packet transmission.
- Note
-
-
The size of the packet sent to the network after processing should not exceed 1200
bytes, otherwise, the packet may fail to be sent.
-
Ensure that both receivers and senders call this method, otherwise, you may meet
undefined behaviors such as no voice and black screen.
-
When you use CDN live streaming, capturing or storage functions, Agora doesn't
recommend calling this method.
- Call this method before joining a channel.
- Returns
-
- 0: Success.
- < 0: Failure.
◆ UnRegisterPacketObserver()
override int agora_gaming_rtc.PacketObserver.UnRegisterPacketObserver
|
( |
|
) |
|
UnRegisters the packet observer.
- Returns
-
- 0: Success.
- < 0: Failure.
The documentation for this class was generated from the following file: