Merge remote-tracking branch 'origin/feature/my' into feature/my

This commit is contained in:
2026-03-25 15:24:18 +08:00
5 changed files with 367 additions and 281 deletions

View File

@@ -83,13 +83,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,
);
},
),