react-native-webrtc / react-native-incall-manager

Handling media-routes/sensors/events during a audio/video chat on React Native
ISC License
547 stars 191 forks source link

Outgoing call ringback on Android is too loud. #218

Open RamsayRomero opened 1 year ago

RamsayRomero commented 1 year ago

On iOS the ringback that plays when calling InCallManager.start sounds like a normal outgoing call ringback and plays at a normal volume through the earpiece, not the speaker. On Android calling the same method results in a ringback that is played loudly through the speaker, and the audio sounds like an incoming call ringtone. Is this expected behavior on Android or is it just my device? Is there anything I can do to fix this issue?

wilmxre commented 1 year ago

@RamsayRomero hey man, did you find a solution for android?

RamsayRomero commented 1 year ago

@wilmxre As far as the ringback sounding like in incoming call ringtone, the default ringback just uses the default system ringtone. There is no default system ringback on Android so you have to provide your own and set the ringback to 'BUNDLE'.

As far as the ringback loudly playing through the speaker, I can't figure out what is going wrong. I looked at the native InCallManager logs while producing this issue and the logs say that my device status is earpiece and that the device is not on speakerphone:

D/InCallManager: New device status: available=[SPEAKER_PHONE, EARPIECE], selected=EARPIECE
D/InCallManager: MediaPlayer mRingback onPrepared(), start play, isSpeakerPhoneOn false

Yet it still plays loudly through the speaker, and once the call is answered, the call audio plays normally through the earpiece.

KolissnikBogdan commented 12 months ago

@RamsayRomero did you manage to figure out the cause of this problem? maybe you have some solution?