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.
◆ 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.
◆ 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.
◆ GetInstance()
◆ ReleaseInstance()
static void agora_gaming_rtc.PacketObserver.ReleaseInstance |
( |
| ) |
|
|
static |
◆ SetEngine()
void agora_gaming_rtc.PacketObserver.SetEngine |
( |
IRtcEngine |
irtcEngine | ) |
|
◆ RegisterPacketObserver()
override int agora_gaming_rtc.PacketObserver.RegisterPacketObserver |
( |
| ) |
|
|
virtual |
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.
Implements agora_gaming_rtc.IPacketObserver.
◆ UnRegisterPacketObserver()
override int agora_gaming_rtc.PacketObserver.UnRegisterPacketObserver |
( |
| ) |
|
|
virtual |
◆ _OnReceiveAudioPacket
◆ _OnReceiveVideoPacket
◆ _OnSendVideoPacket
◆ _OnSendAudioPacket
◆ _packetObserver
The documentation for this class was generated from the following file: