修复作业停止之后的bug 和远程遥控模式 默认前视角

This commit is contained in:
mmc
2026-03-25 09:48:05 +08:00
parent c4d085cb45
commit d6ad53a1ed
3 changed files with 90 additions and 62 deletions

View File

@@ -76,13 +76,15 @@ class _RemoteControlPageState extends State<RemoteControlPage> {
} else {
_videoStreamUrl = '';
}
final int originY = context.watch<RemoteControlCubit>().state.controlEntity.originY;
debugPrint("${originY},originY");
return WebRTCLocalPlayer(
// 这里的 URL 拼接根据你的后端规则
// streamUrl: "webrtc://${TCPConsts.TCP_IP}/live/livestream/${currentDevice.deviceName}?token=${userState.user!.token}",
streamUrl: _videoStreamUrl,
showLeftPip: state.showLeftPip, // 从 Cubit 状态中读取
showRightPip: state.showRightPip, // 从 Cubit 状态中读取
isFrontMain: context.watch<RemoteControlCubit>().state.controlEntity.originY>= 0.5,
isFrontMain: context.watch<RemoteControlCubit>().state.controlEntity.originY >= 0,
);
},
),