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

Video Call - 1 device is loud but 1 device is very quiet

Open
#144 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
597
Forks
201
Avg merge
2h 42m
Merged PRs (30d)
1

Description

Explanation

When making a video call between 2 phones via WebRTC, I can hear very clearly through the speaker on the first phone (IOS 13, iphone 6) but the other phone is nearly always quiet (barely hear from speaker) (IOS 13, iphone SE). Sometimes it works but usually I cannot hear much.


Code

This is my implementation:

    Wazo.Phone.on(Wazo.Phone.ON_CALL_ACCEPTED, async (sess: any) => {
      if (isCall || ready) return;
      session.current = sess;
      const sipSession = Wazo.Phone.getCurrentSipSession();

      if (session.current?.cameraEnabled) {
        const { peerConnection } = sipSession.sessionDescriptionHandler;
        const lStreams = peerConnection.getLocalStreams();
        const rStreams = peerConnection.getRemoteStreams();

        const anyTrack = (stream: any) => !!stream.getVideoTracks().length;
        local.current = lStreams.find(anyTrack);
        remote.current = rStreams.find(anyTrack);

        if (!isIOS) {
          RNCallKeep.backToForeground();
        }
        await inCallManager.start({ media: 'video' });
        await inCallManager.setSpeakerphoneOn(true);
      } else if (session.current) {
        await inCallManager.start({ media: 'audio' });
        await inCallManager.setSpeakerphoneOn(false);
      }

      await sipSession.sendReinvite();
      dispatch({ ready: true });
    });
Env
    "react-native-webrtc": "^1.75.3",
    "react-native-incall-manager": "^3.2.7",
    "react-native": "^0.62.2",
    "react": "^16.13.1",

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported ON_CALL_ACCEPTED callback and the react-native-incall-manager calls in the supplied implementation. Reproduce the WebRTC call between an iPhone 6 and iPhone SE on iOS 13, then inspect speaker routing around start, setSpeakerphoneOn, and sendReinvite. Done means audio volume is reliably comparable on both devices, with a focused reproduction or test if the project supports one.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript, react-native
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.