AgoraDataStreamConfig Class Reference
Inherits from | NSObject |
---|---|
Declared in | AgoraObjects.h |
Overview
The configurations for the data stream.
The following table shows the relationship between the syncWithAudio
parameter and the ordered
parameter:
syncWithAudio |
ordered |
SDK behaviors |
---|---|---|
NO |
NO |
The SDK triggers the receiveStreamMessageFromUid callback immediately after the receiver receives a data packet. |
YES |
NO |
receiveStreamMessageFromUid callback when the synchronized audio packet is played out.receiveStreamMessageFromUid callback as soon as the data packet is received. In this case, the data packet is not synchronized with the audio packet. |
NO |
YES |
|
YES |
YES |
|
ordered
Whether the SDK guarantees that the receiver receives the data in the sent order.
@property (assign, nonatomic) BOOL ordered
Discussion
YES
: Guarantee that the receiver receives the data in the sent order.NO
: Do not guarantee that the receiver receives the data in the sent order.
Do not set this parameter to YES
if you need the receiver to receive
the data immediately.
Declared In
AgoraObjects.h
syncWithAudio
Whether to synchronize the data packet with the published audio packet.
@property (assign, nonatomic) BOOL syncWithAudio
Discussion
YES
: Synchronize the data packet with the audio packet.NO
: Do not synchronize the data packet with the audio packet.
When you set the data packet to synchronize with the audio, then if the data
packet delay is within the audio delay range, the SDK triggers the receiveStreamMessageFromUid
callback when the synchronized audio packet is played out. Do not set this
parameter as YES
if you need the receiver to receive the data packet
immediately. Agora recommends that you set this parameter to YES
only
when you need to implement specific functions, for example lyric
synchronization.
Declared In
AgoraObjects.h