feat: 完善机巢图传、拍摄阶段与任务交互
- 完善双路 RTC 接收、首帧切换及拍摄结束后的本地播放释放 - 对齐无人机状态枚举与正常拍完返航标记,新增到达后本地倒计时 - 补充准备页电量与前往回执,进入任务时移除准备页路由 - 对齐拍摄中和拍摄完成原型布局,移除详情按钮 - 补充隔离测试、接口记录与项目约定 验证:最近 157 项相关模拟器隔离测试通过,Release 无签名编译通过;未调用真实飞控或图传。
This commit is contained in:
@@ -99,7 +99,7 @@ final class DroneDockLiveViewModel {
|
||||
case .failed, .unavailable: return "重试"
|
||||
case .localPreview: return "重新加载模拟图传"
|
||||
case .connecting: return nil
|
||||
case .playing: return "刷新图传"
|
||||
case .playing: return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +137,14 @@ final class DroneDockLiveViewModel {
|
||||
let canKeepSession = keepingPlayback && playbackSessionID != nil
|
||||
&& sameDevice
|
||||
&& rtcConfigurations.first?.appID == configurations.first?.appID
|
||||
rtcConfigurations = configurations
|
||||
rtcConfiguration = configurations.first
|
||||
rtcConfigurations = configurations.map { incoming in
|
||||
// live 每次可能生成新 user_id;补流时保留尚未临期的原入房身份,避免销毁健康房间。
|
||||
guard canKeepSession, let previous = rtcConfigurations.first(where: { $0.role == incoming.role }),
|
||||
previous.appID == incoming.appID, previous.roomID == incoming.roomID,
|
||||
previous.userID != incoming.userID, previous.expiresAt.timeIntervalSince(now()) > 30 else { return incoming }
|
||||
return previous
|
||||
}
|
||||
rtcConfiguration = rtcConfigurations.first
|
||||
if !canKeepSession {
|
||||
activeRole = nil
|
||||
playbackSessionID = UUID()
|
||||
|
||||
Reference in New Issue
Block a user