DataStreamConfig class

数据流设置。

下表展示不同的参数设置下,SDK 的行为: syncWithAudio ordered SDK 行为 false false 接收端接收到数据包后,SDK 立刻触发 onStreamMessage 回调。 true false 如果数据包的延迟在音频延迟的范围内,SDK 会在播放音频的同时触发与该音频包同步的 onStreamMessage 回调。如果数据包的延迟超出了音频延迟,SDK 会在接收到该数据包时立刻触发 onStreamMessage 回调;此情况会造成音频包和数据包的不同步。 false true 如果数据包的延迟在 5 秒以内,SDK 会修正数据包的乱序问题。如果数据包的延迟超出 5 秒,SDK 会丢弃该数据包。 true true 如果数据包的延迟在音频延迟的范围内,SDK 会修正数据包的乱序问题。如果数据包的延迟超出音频延迟,SDK 会丢弃该数据包。

Annotations
  • @JsonSerializable.new(explicitToJson: true, includeIfNull: false)

Properties

hashCode int
The hash code for this object.
no setterinherited
ordered bool?
是否保证接收到的数据按发送的顺序排列。 true : 保证 SDK 按照发送方发送的顺序输出数据包。 false : 不保证 SDK 按照发送方发送的顺序输出数据包。 当需要数据包立刻到达接收端时,不能将该参数设置为 true 。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
syncWithAudio bool?
是否与本地发送的音频流同步。 true : 数据流与音频流同步。该设置适用于歌词同步等特殊场景。 false : 数据流与音频流不同步。该设置适用于需要数据包立刻到达接收端的场景。 设置数据流与音频流同步后,如果数据包的延迟在音频延迟的范围内,SDK 会在播放音频的同时触发与该音频包同步的 onStreamMessage 回调。
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