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

When connected via high latency over the Internet, tapping the screen becomes a long press behavior #4816

Open
2 tasks done
bigoovip opened this issue Apr 5, 2024 · 1 comment

Comments

@bigoovip
Copy link

bigoovip commented Apr 5, 2024

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Windows
  • scrcpy version: 2.4
  • installation method: Windows release
  • device model:pixel 4 XL
  • Android version: 13

Describe the bug
When I controlled my device over the internet, tapping the screen turned into a long-press behavior, making it nearly unusable. The same applies even if parameters such as "max-size=720" and "video-bit-rate=1M" are added.
However, I don't have this behavior when I use my local LAN to control my device.
I also use rustdesk to remotely control my device through the Internet. There is a high delay, but the clicking behavior is normal.
The latency of connecting my device from the Internet is relatively high, with a "ping" of more than 200 milliseconds, and the actual performance is estimated to have a delay of 2 to 3 seconds. I don’t know if this phenomenon is caused by high latency. If so, is there any way to resolve it? Or will it be solved in the future?

@rom1v
Copy link
Collaborator

rom1v commented Apr 5, 2024

tapping the screen becomes a long press behavior

The duration between input events is not guaranteed to be preserved, which can become visible under huge network jitter.

So in your case, your DOWN and UP events are separated by a small duration, but they are received separated by a longer duration. The only way to avoid it would be to add buffering (i.e. additional latency on purpose) to compensate for jitter, the same way as the option --display-buffer (#2464) buffers video frames.

It is not plan to implement it for input events (scrcpy aims to mirror with high performance, so it assumes that the latency/jitter is low enough).

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

2 participants