refactor: cache window size & scale in driver

This commit is contained in:
lilong.129
2025-02-14 10:35:22 +08:00
parent 6c3f21134b
commit c8d776009c
7 changed files with 33 additions and 27 deletions

View File

@@ -524,10 +524,6 @@ func (dev *IOSDevice) NewHTTPDriver(capabilities option.Capabilities) (driver ID
}
wd.mjpegClient = NewHTTPClientWithConnection(wd.mjpegHTTPConn, 30*time.Second)
wd.mjpegUrl = fmt.Sprintf("%s:%d", host, localMjpegPort)
// init WDA scale
if wd.Session.scale, err = wd.Scale(); err != nil {
return nil, err
}
return wd, nil
}