When connected via high latency over the Internet, tapping the screen becomes a long press behavior
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?
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).