测试优化实时监控中心,接收全部的机器信息 ,优化显示图标的问题,优化且任务的时候显示 规划路径

This commit is contained in:
mmc
2026-09-21 13:24:06 +08:00
parent 1fd99e62d6
commit 0e95bb0c96
7 changed files with 222 additions and 125 deletions

View File

@@ -5,7 +5,7 @@ import { Badge, message } from "antd";
AgoraRTC.setLogLevel(2); // 2=只输出warning/error,屏蔽debug日志
const APP_ID = "7887b4db6033410d9ac3264b40ca9c1a";
const TOKEN = "007eJxTYDhxaLPL8617mtfHFi2tfJhQNSXh5vNJnqvu8b/3PenKKdumwGBuYWGeZJKSZGZgbGxiaJBimZhsbGRmkmRikJxomWyYuHHFiqyGQEaGB6+fMDEyQCCIz81gYqhbklGUmphrYMTAAAAyfSTX";
const TOKEN = "007eJxTYPh6QSj59sUzD3mPNm64dK9n/n1PP64UzrhzdwUeqMUKv1BVYDC3sDBPMklJMjMwNjYxNEixTEw2NjIzSTIxSE60TDZMlOdYldUQyMiQXKbEwAiFID43g4mhbklGUWpiroExAwMAjGAhHQ==";
export default function AgrtcRoomRobot({ CHANNEL }: { CHANNEL: string }) {
const [uid] = useState(() => Number(Math.floor(Math.random() * 100000)));
@@ -22,7 +22,7 @@ export default function AgrtcRoomRobot({ CHANNEL }: { CHANNEL: string }) {
useEffect(() => {
const client = AgoraRTC.createClient({
mode: "rtc",
mode: "live",
codec: "h264",
});
clientRef.current = client;
@@ -145,7 +145,7 @@ export default function AgrtcRoomRobot({ CHANNEL }: { CHANNEL: string }) {
const onUserUnpublished = (user: any, mediaType: "video" | "audio") => {
if (isUnmounted) return;
console.log("user-unpublished", user.uid, mediaType);
console.log("user-unpublished", user.uid, mediaType, subscribedUidRef.current);
if (mediaType === "video" && subscribedUidRef.current === user.uid) {
if (unpublishTimer) clearTimeout(unpublishTimer);
// 延迟2s清空,短闪断自动恢复不黑屏