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() {
//get remote user list
const remoteUsers = useRemoteUsers();
const videoTracks = useRemoteVideoTracks(remoteUsers);
return <></>;
}
This hook lets you automatically subscribe to and retrieve remote users' audio tracks. When the component is unmounted, this hook stops subscribing to the audio tracks of the specified users. This hook updates the subscribed audio tracks when the users parameter changes.