ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

There is a latency of approx. 2 seconds in video call #118

Closed AbhiSri2020 closed 2 years ago

AbhiSri2020 commented 3 years ago

I am working on the sample code of video chat and I noticed a voice/video reaches after 2 seconds on the other side.

this is my configuration:

static MEDIA_OPTIONS = { audio: true, video: { facingMode: 'user', width: { min: 144, ideal: 1280, max: 1980 }, height: { min: 176, ideal: 720, max: 1080 } } };

DaveLomber commented 3 years ago

Is it p2p or Conferencing code sample?

AbhiSri2020 commented 3 years ago

It is p2p, just 2 person

DaveLomber commented 3 years ago

this one? https://github.com/ConnectyCube/connectycube-reactnative-samples/tree/master/RNVideoChat

you are trying to use HD quality, could you try some SD/LD and let us know how it works

AbhiSri2020 commented 3 years ago

Yes I am using sample code from [https://github.com/ConnectyCube/connectycube-reactnative-samples/tree/master/RNVideoChat]

these are configuration that I have tested:

static MEDIA_OPTIONS = {
    audio: true, video: {
      facingMode: 'user',
      width: 1980,
      height: 1080
    }
 };
static MEDIA_OPTIONS = {
    audio: true, video: {
      facingMode: 'user',
      width: Dimensions.get("window").width,
      height: Dimensions.get("window").height
    }
};
static MEDIA_OPTIONS = {
    audio: true, video: {
      facingMode: 'user',
      width: 144,
      height: 176
    }
};

But still, I am facing latency of at least 2 seconds which increases with time.

Moreover, my internet bandwidth is: download: 10.7mbps upload: 1mbps. While video chatting internet speed (consumption as shown on the status bar) is 30kbps to 70kbps on the basis of quality, whereas while playing youtube video speed is 500+ kbps (for HD)

ccvlad commented 2 years ago

Closed due to inactivity. Please create a new issue if needed.