完善机巢任务实时同步并开放双构建真实操作
订阅明确无缓存时使用新发起的有效 HTTP 全量响应衔接首包,保留任务、批次和版本校验。 移除 Debug/Release 的设备指令、图传和 RTC 构建拦截,保留后端权限、身份、防重复提交及结果未知保护。 更新开发约定并补充隔离传输、飞控状态和页面回归测试。 验证:iPhone 真机 500 项相关测试通过;iOS Release 无签名编译通过。
This commit is contained in:
@@ -18,7 +18,7 @@ extension DroneDockLivePlaying {
|
||||
func setGeometryHandler(_ handler: (@MainActor (DroneDockLiveGeometry) -> Void)?) {}
|
||||
}
|
||||
|
||||
/// 真实 SDK 入口始终执行编译期禁飞保护,没有运行时放行参数。
|
||||
/// 通过双路接收器播放真实图传,生命周期由任务页管理。
|
||||
@MainActor
|
||||
final class DroneDockVolcLivePlayer: DroneDockLivePlaying {
|
||||
private let receiver = DroneDockLiveReceiver(makeEngine: DroneDockVolcEngineAdapter.make)
|
||||
@@ -28,12 +28,9 @@ final class DroneDockVolcLivePlayer: DroneDockLivePlaying {
|
||||
receiver.setGeometryHandler(handler)
|
||||
}
|
||||
|
||||
/// Release 通过接收器播放;Debug 在创建 SDK 之前拒绝连接。
|
||||
/// 两种构建均通过同一接收器播放当前任务的图传。
|
||||
func start(_ configurations: [DroneDockVolcLiveConfiguration], in view: UIView,
|
||||
onEvent: @escaping @MainActor (DroneDockLivePlaybackEvent) -> Void) {
|
||||
guard !DeviceCommandDebugPolicy.blocksLiveRequests else {
|
||||
stop(); onEvent(.failed(DeviceCommandDebugPolicy.blockedMessage)); return
|
||||
}
|
||||
receiver.start(configurations, in: view, onEvent: onEvent)
|
||||
}
|
||||
|
||||
@@ -48,7 +45,7 @@ final class DroneDockLiveReceiver: DroneDockLivePlaying {
|
||||
private let makeEngine: (String, @escaping @Sendable (DroneDockVolcEvent) -> Void) -> (any DroneDockRTCReceivingEngine)?
|
||||
private let firstFrameDelay: @Sendable () async throws -> Void
|
||||
|
||||
/// 生产环境注入带 Debug 保护的适配器;测试只注入内存接收端。
|
||||
/// 正式页面注入 SDK 适配器;测试注入内存接收端。
|
||||
init(makeEngine: @escaping (String, @escaping @Sendable (DroneDockVolcEvent) -> Void) -> (any DroneDockRTCReceivingEngine)?,
|
||||
firstFrameDelay: @escaping @Sendable () async throws -> Void = { try await Task.sleep(for: .seconds(20)) }) {
|
||||
self.makeEngine = makeEngine
|
||||
|
||||
Reference in New Issue
Block a user