react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

Can not turn on speaker! (Set loudspeaker)

Open tabvn opened this issue 2 years ago • 8 comments

Anyone luck with video call and turn on speaker. Currently audio ouput is small for video call it seem using earIn

 const routes = await RNCallKeep.getAudioRoutes();
      console.log('DEBUG routes', routes, uuid);
      if (routes && routes.length) {
        const route = routes.find((r) => r.type === 'Speaker');
        if (route) {
          console.log('ACTIVE route', route);
          await RNCallKeep.setAudioRoute(uuid, route.name);
        }
      }

Best regards, Toan

tabvn avatar May 13 '22 09:05 tabvn

The problem is video call but can not turn on speaker. Anyone has solved this problem? Thank you!

tabvn avatar May 14 '22 04:05 tabvn

Start call

 RNCallKeep.startCall(id, `${user.phone}`, '+84...', 'number', true);

Answer call

 RNCallKeep.displayIncomingCall(
                data.id,
                `${data.caller.phone}`,
                `${data.caller.firstName}`,
                'number',
                true
              );
const onAnswerCallAction = (data) => {
      let { callUUID } = data;
      RNCallKeep.setCurrentCallActive(callUUID);
      //RNCallKeep.answerIncomingCall(callUUID);
      //RNCallKeep.setAudioRoute(callUUID, 'Speaker');
      console.log('answer call', data);
      if (!isIOS) {
        RNCallKeep.backToForeground();
      }
      dispatch(accept(callUUID));
    };

tabvn avatar May 14 '22 04:05 tabvn

Hi @tabvn did you resolve the issue?

saheemhussain avatar Aug 17 '22 14:08 saheemhussain

anybody could fix this problem?

dragoshuniq avatar Oct 14 '22 13:10 dragoshuniq

anyone find solution if yes please share here @tabvn

kukadiyaAni avatar Oct 18 '22 10:10 kukadiyaAni

@dragoshuniq @kukadiyaAni @saheemhussainchicmic check out https://github.com/react-native-webrtc/react-native-incall-manager This was a solution for me -- although I am still having some inconsistencies with some edge cases (eg when a call is in progress, the volume control doesn't work on Android)

glesperance avatar Oct 19 '22 16:10 glesperance

Hi, @glesperance I am also trying the plugin mentioned by you. Yet it's not working for me. Can you please share all things you did to make it work?

anujraghuvanshi avatar Dec 06 '22 04:12 anujraghuvanshi