The remote user.
The media type. Pass "video"
or "audio"
.
Optional
client: null | IAgoraRTCClientCreated using the Web SDK's IAgoraRTC.createClient
method.
import { useRemoteUsers, useRemoteUserTrack } from "agora-rtc-react";
function App() {
const remoteUsers = useRemoteUsers();
const videoTrack = useRemoteUserTrack(remoteUsers[0], "video");
const audioTrack = useRemoteUserTrack(remoteUsers[0], "audio");
return <></>;
}
Optional
client: null | IAgoraRTCClient
This hook lets you retrieve the audio or video track of a remote user.