DataStreamConfig class
Data stream settings.
The table below shows the SDK behavior under different parameter settings: syncWithAudio ordered SDK Behavior false false The SDK immediately triggers the onStreamMessage callback upon receiving a data packet. true false If the data packet delay is within the audio delay range, the SDK triggers the onStreamMessage callback synchronized with the audio packet during audio playback. If the delay exceeds the audio delay, the SDK triggers the callback immediately upon receiving the data packet, which may cause desynchronization between audio and data packets. false true If the data packet delay is within 5 seconds, the SDK corrects the packet disorder. If the delay exceeds 5 seconds, the SDK discards the packet. true true If the data packet delay is within the audio delay range, the SDK corrects the packet disorder. If the delay exceeds the audio delay, the SDK discards the packet.
- Annotations
-
- @JsonSerializable.new(explicitToJson: true, includeIfNull: false)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- ordered → bool?
-
Whether to ensure the received data is in the same order as sent. true : Ensures the SDK outputs data packets in the same order as sent. false : Does not ensure the SDK outputs data packets in the same order as sent. Do not set this parameter to true if you require data packets to reach the receiver immediately.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- syncWithAudio → bool?
-
Whether to synchronize with the locally sent audio stream. true : The data stream is synchronized with the audio stream. Suitable for scenarios like lyrics synchronization. false : The data stream is not synchronized with the audio stream. Suitable for scenarios where data packets need to reach the receiver immediately. When synchronization is enabled, if the data packet delay is within the audio delay range, the SDK triggers the onStreamMessage callback synchronized with the audio packet during audio playback.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited