Created
April 29, 2023 15:15
-
-
Save dueka/5437313cd597732595f4b80b521e4989 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