无人机组件加key

This commit is contained in:
mmc
2026-06-03 16:16:26 +08:00
parent 14970f7296
commit afea014b3a
2 changed files with 4 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ const parseUrlParams = (url) => {
};
};
export default function AgoraRtcRoom({ url = "" }) {
export default function AgoraRtcRoom({ url = "", key }) {
const { appId, channel, token, uid } = parseUrlParams(url);
@@ -277,6 +277,7 @@ export default function AgoraRtcRoom({ url = "" }) {
width: "100%",
height: '100%'
}}
key={key}
>

View File

@@ -5,6 +5,7 @@ import { DroneRTC } from "./droneplayer";
export default function DroneLivePlayer({
streamData,
videoMode = "NORMAL",
key
}) {
const containerRef = useRef(null);
const rtcRef = useRef(null);
@@ -82,6 +83,7 @@ export default function DroneLivePlayer({
return (
<div
ref={containerRef}
key={key}
style={{
width: "100%",
height: "100%",