diff --git a/src/components/AgoraRtc.tsx b/src/components/AgoraRtc.tsx index 5503a0b..b7bbddd 100644 --- a/src/components/AgoraRtc.tsx +++ b/src/components/AgoraRtc.tsx @@ -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} > diff --git a/src/components/VolcRtcPlayer.jsx b/src/components/VolcRtcPlayer.jsx index 3e4de07..107eedd 100644 --- a/src/components/VolcRtcPlayer.jsx +++ b/src/components/VolcRtcPlayer.jsx @@ -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 (