Giter VIP home page Giter VIP logo

Comments (6)

drauggres avatar drauggres commented on July 26, 2024

Hello again :-).

Here is what I need from you:

  1. open devtools for a "stream page"
  2. run var {videoWidth, videoHeight} = document.getElementsByTagName('video')[0]; console.log({videoWidth, videoHeight}) in devtools console
  3. open "network" tab in devtools
  4. click in the top-left, then bottom-right corners of the video

Paste here:

  1. output from the second step
  2. response for GET wda/screen request
  3. request payloads for two POST wda/touch/perform

For iPhone 11 Pro I got:

  1. {videoWidth: 1126, videoHeight: 2436}
{
  "value" : {
    "statusBarSize" : {
      "width" : 375,
      "height" : 44
    },
    "scale" : 3
  },
  "sessionId" : "DFA28E6E-0B23-4AF1-B352-9B6ED8CBB7E0"
}
{"actions":[{"action":"tap","options":{"x":2,"y":2}}]}
{"actions":[{"action":"tap","options":{"x":373,"y":811}}]}
Screenshot. wda/screen

wda-screen

Screenshot. wda/touch/perform

wda-touch

from ws-scrcpy.

egegrsn avatar egegrsn commented on July 26, 2024

For iPhone 7 Plus I got:

  1. {videoWidth: 1080, videoHeight: 1920}
{
  "value" : {
    "statusBarSize" : {
      "width" : 414,
      "height" : 20
    },
    "scale" : 3
  },
  "sessionId" : "CAAB2212-6AEF-4709-922F-8DBAEF92CAFE"
}
  1. {actions: [{action: "tap", options: {x: 3, y: 3}}]}
    {actions: [{action: "tap", options: {x: 356, y: 636}}]}

from ws-scrcpy.

egegrsn avatar egegrsn commented on July 26, 2024

Hi, have you found anything about this issue?

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

Did you try with develop branch? Looks like this problem has already been fixed there.

In master: width = videoWidth / scale; height = videoHeight / scale; // (360 x 640)
In develop: width = statusBarSize.width; height = videoHeight / (videoWidth / statusBarSize.width); // (414 x 736)

https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Displays/Displays.html

from ws-scrcpy.

egegrsn avatar egegrsn commented on July 26, 2024

Hi, I have tried develop branch. Bottom side of the UI does not work properly. I can't click anything from dock.

I tried to clone develop branch like
git clone -b develop https://github.com/NetrisTV/ws-scrcpy.git

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

I tried to clone develop branch like
git clone -b develop https://github.com/NetrisTV/ws-scrcpy.git

OK, this will work too (you could checkout to develop without cloning everything again).

Unfortunately I can't debug it without a real device. You'll have to deal with it yourself.
For a start you can check coordinates (as you did before) and verify, that they are in the correct range ([0; 414], [0; 736]).
Then try to install Appium Desktop and see what coordinates it generates for clicks on the dock.

P.S. you rebuilt frontend after switching to develop, right? (npm install;npm run dist:qvhack:frontend)

from ws-scrcpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.