The list of remote users.
Optional
client: null | IAgoraRTCClientCreated using the Web SDK's IAgoraRTC.createClient
method.
import { useRemoteUsers, useRemoteVideoTracks } from "agora-rtc-react";
function App() {
const remoteUsers = useRemoteUsers();
const videoTracks = useRemoteVideoTracks(remoteUsers);
return <></>;
}
This hook lets you automatically subscribe to and retrieve remote users' video tracks. When the component is unmounted, this hook stops subscribing to the video tracks of the specified users. This hook updates the subscribed video tracks when the users parameter changes.