Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By using this package, I integrated the audio functionality. However, the voice is currently coming through the speaker. How can we enable the audio to use the earpiece instead? #158

Open
pavaniUMR opened this issue May 21, 2024 · 0 comments

Comments

@pavaniUMR
Copy link

Implemented by using the agora UIkit for audio and video. For audio the voice is come from loudspeaker after here is the code snippet
const setupVideoSDKEngine = async () => {
agoraEngineRef.current = createAgoraRtcEngine();
const agoraEngine = agoraEngineRef.current;
const inalizationofAgora = agoraEngine.initialize({
appId: remoteConfig().getValue('agoraAppId').asString(),
channelProfile: ChannelProfileType.ChannelProfileCommunication,
});
if (route.params.connectType == 'audio') {
agoraEngine.disableVideo();
agoraEngine.enableLocalVideo(false);
agoraEngine?.current?.setEnableSpeakerphone(false);
if (muteStatus === true) {
agoraEngine.disableAudio();
agoraEngine.muteLocalAudioStream(true);
}
} else {
agoraEngine.enableVideo();
agoraEngine.enableLocalVideo(true);
videoEnableStatusRef.current = true;
}
};
and the

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant