Public 属性 | |
bool | syncWithAudio |
bool | ordered |
数据流设置。
syncWithAudio | ordered | SDK 行为 |
---|---|---|
false | false | 接收端接收到数据包后,SDK 立刻触发 OnStreamMessageHandler 或 ChannelOnStreamMessageHandler 回调。 |
true | false |
如果数据包的延迟在音频延迟的范围内,SDK 会在播放音频的同时触发与该音频包同步的 如果数据包的延迟超出了音频延迟,SDK 会在接收到该数据包时立刻触发 |
false | true |
如果数据包的延迟在 5 秒以内,SDK 会修正数据包的乱序问题。 如果数据包的延迟超出 5 秒,SDK 会丢弃该数据包。 |
true | true |
如果数据包的延迟在音频延迟的范围内,SDK 会修正数据包的乱序问题。 如果数据包的延迟超出音频延迟,SDK 会丢弃该数据包。 |
bool agora_gaming_rtc.DataStreamConfig.syncWithAudio |
是否与本地发送的音频流同步:
设置为与音频同步后,如果数据包的延迟在音频延迟的范围内,SDK 会在播放音频的同时触发与该音频包同步的 OnStreamMessageHandler 或 ChannelOnStreamMessageHandler 回调。 当需要数据包立刻到达接收端时,不能将该参数设置为 true
。Agora 建议你仅在需要实现特殊场景,例如歌词同步时,设置为与音频同步。
bool agora_gaming_rtc.DataStreamConfig.ordered |
是否保证接收到的数据按发送的顺序排列:
当需要数据包立刻到达接收端时,不能将该参数设置为 true
。