无人机组件加key
This commit is contained in:
@@ -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);
|
const { appId, channel, token, uid } = parseUrlParams(url);
|
||||||
|
|
||||||
|
|
||||||
@@ -277,6 +277,7 @@ export default function AgoraRtcRoom({ url = "" }) {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
height: '100%'
|
height: '100%'
|
||||||
}}
|
}}
|
||||||
|
key={key}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { DroneRTC } from "./droneplayer";
|
|||||||
export default function DroneLivePlayer({
|
export default function DroneLivePlayer({
|
||||||
streamData,
|
streamData,
|
||||||
videoMode = "NORMAL",
|
videoMode = "NORMAL",
|
||||||
|
key
|
||||||
}) {
|
}) {
|
||||||
const containerRef = useRef(null);
|
const containerRef = useRef(null);
|
||||||
const rtcRef = useRef(null);
|
const rtcRef = useRef(null);
|
||||||
@@ -82,6 +83,7 @@ export default function DroneLivePlayer({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={containerRef}
|
ref={containerRef}
|
||||||
|
key={key}
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
|
|||||||
Reference in New Issue
Block a user