DataStreamConfig class Null safety

数据流设置。

下表展示了 syncWithAudio 参数和 ordered 参数的关系:

syncWithAudioorderedSDK 行为
falsefalse接收端接收到数据包后,SDK 立刻触发 streamMessage 回调。
truefalse
  • 如果数据包的延迟在音频延迟的范围内,SDK 会在播放音频的同时触发与该音频包同步的 streamMessage 回调。
  • 如果某数据包的延迟超出了音频延迟,SDK 会在接收到该数据包时立刻触发 streamMessage 回调;此情况会造成音频包和数据包的不同步。
falsetrue
  • 如果数据包的延迟在 5 秒以内,SDK 会修正数据包的乱序问题。
  • 如果数据包的延迟超出 5 秒,SDK 会丢弃该数据包。
truetrue
  • 如果数据包的延迟在音频延迟的范围内,SDK 会修正数据包的乱序问题。
  • 如果数据包的延迟超出音频延迟,SDK 会丢弃该数据包。
Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

DataStreamConfig(bool syncWithAudio, bool ordered)
Constructs a DataStreamConfig

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
ordered bool
是否保证接收到的数据按发送的顺序排列。 [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
syncWithAudio bool
是否与本地发送的音频流同步。 [...]
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited