import { LocalUser, useLocalAudioTrack, useLocalCameraTrack } from "agora-rtc-react";
function App() {
const audioTrack = useLocalAudioTrack();
const videoTrack = useLocalCameraTrack();
return (
<LocalUser
audioTrack={audioTrack}
cameraOn
cover={COVER_IMAGE_URL}
micOn
playAudio
playVideo
videoTrack={videoTrack}
/>
);
}
This component plays the camera video track and the microphone audio track of the local user using the playback devices selected by the user in the browser.