Created
April 29, 2023 15:15
-
-
Save dueka/3ed530b0839776f7034b4bf1862ad7ef to your computer and use it in GitHub Desktop.
App.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const leave = async () => { | |
setLeaveLoading(true); | |
try { | |
agoraEngineRef.current?.leaveChannel(); | |
agoraEngineRef.current | |
?.getMediaEngine() | |
.unregisterAudioFrameObserver(iAudioFrameObserver); | |
console.log('stop recording '); | |
agoraEngineRef.current?.stopAudioRecording(); | |
startTranscribe(); | |
setRemoteUid(0); | |
setIsJoined(false); | |
console.log('you left the channel'); | |
} catch (e) { | |
console.log(e); | |
} | |
setLeaveLoading(false); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment