appium-espresso-driver 10.0.3 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/lib/execute-method-map.d.ts +16 -0
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
- package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
- package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
- package/espresso-server/gradle/libs.versions.toml +2 -0
- package/espresso-server/library/build.gradle.kts +3 -0
- package/espresso-server/library/src/composeOn/java/io/appium/espressoserver/lib/helpers/ComposeNodeFinder.kt +3 -3
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/handlers/exceptions/XPathLookupException.kt +10 -2
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/ViewFinder.kt +3 -0
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/model/SourceDocument.kt +4 -21
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/model/XPathQuery.kt +64 -0
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/viewmatcher/WithXPath.kt +3 -3
- package/espresso-server/library/src/test/java/io/appium/espressoserver/test/helpers/XPathQueryTests.kt +101 -0
- package/espresso-server/settings.gradle.kts +4 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/helpers/caps.js +1 -1
- package/node_modules/@appium/base-driver/lib/basedriver/helpers/caps.ts +1 -1
- package/node_modules/@appium/base-driver/package.json +4 -4
- package/node_modules/@appium/logger/CHANGELOG.md +37 -0
- package/node_modules/@appium/logger/package.json +2 -2
- package/node_modules/@appium/schema/package.json +2 -2
- package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/zip.js +11 -11
- package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
- package/node_modules/@appium/support/lib/zip.ts +11 -12
- package/node_modules/@appium/support/node_modules/teen_process/CHANGELOG.md +1122 -0
- package/node_modules/@appium/support/node_modules/teen_process/LICENSE +201 -0
- package/node_modules/@appium/support/node_modules/teen_process/README.md +270 -0
- package/node_modules/@appium/support/node_modules/teen_process/lib/circular-buffer.ts +60 -0
- package/node_modules/@appium/support/node_modules/teen_process/lib/exec.ts +176 -0
- package/node_modules/@appium/support/node_modules/teen_process/lib/helpers.ts +45 -0
- package/node_modules/@appium/support/node_modules/teen_process/lib/index.ts +4 -0
- package/node_modules/@appium/support/node_modules/teen_process/lib/subprocess.ts +358 -0
- package/node_modules/@appium/support/node_modules/teen_process/lib/types.ts +83 -0
- package/node_modules/@appium/support/node_modules/teen_process/package.json +81 -0
- package/node_modules/@appium/support/package.json +5 -5
- package/node_modules/@appium/types/package.json +5 -5
- package/node_modules/appium-adb/CHANGELOG.md +14 -0
- package/node_modules/appium-adb/node_modules/asyncbox/LICENSE +203 -0
- package/node_modules/appium-adb/node_modules/asyncbox/README.md +272 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.d.ts +12 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.js +10 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.js +2 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.js +53 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
- package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/index.ts +28 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/lock/lock.ts +369 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/shared/errors.ts +51 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/shared/types.ts +88 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/time/retry.ts +61 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/time/sleep.ts +79 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
- package/node_modules/appium-adb/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
- package/node_modules/appium-adb/node_modules/asyncbox/package.json +60 -0
- package/node_modules/appium-adb/package.json +4 -4
- package/node_modules/appium-android-driver/CHANGELOG.md +36 -0
- package/node_modules/appium-android-driver/README.md +4 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.d.ts +16 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.js +42 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.d.ts +11 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.js +96 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts +14 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js +16 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts +42 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js +127 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.d.ts +6 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.js +17 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.d.ts +12 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.js +196 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts +65 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js +339 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.d.ts +67 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.d.ts.map +1 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.js +2 -0
- package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.js.map +1 -0
- package/node_modules/appium-android-driver/build/lib/driver.d.ts +20 -0
- package/node_modules/appium-android-driver/build/lib/driver.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/driver.js +9 -0
- package/node_modules/appium-android-driver/build/lib/driver.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts +16 -0
- package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/execute-method-map.js +16 -0
- package/node_modules/appium-android-driver/build/lib/execute-method-map.js.map +1 -1
- package/node_modules/appium-android-driver/lib/commands/media-stream/batcher.ts +44 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/capabilities.ts +101 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/constants.ts +15 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/exports.ts +182 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/jpeg.ts +16 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/sps.ts +208 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/stream.ts +385 -0
- package/node_modules/appium-android-driver/lib/commands/media-stream/types.ts +65 -0
- package/node_modules/appium-android-driver/lib/driver.ts +16 -0
- package/node_modules/appium-android-driver/lib/execute-method-map.ts +17 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/LICENSE +203 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/README.md +272 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts +12 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js +10 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.js +2 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js +53 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/index.ts +28 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/lock/lock.ts +369 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/shared/errors.ts +51 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/shared/types.ts +88 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/retry.ts +61 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/sleep.ts +79 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
- package/node_modules/appium-android-driver/node_modules/asyncbox/package.json +60 -0
- package/node_modules/appium-android-driver/package.json +7 -7
- package/node_modules/appium-chromedriver/CHANGELOG.md +14 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/LICENSE +203 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/README.md +272 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts +12 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js +10 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.js +2 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js +53 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/index.ts +28 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/lock/lock.ts +369 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/shared/errors.ts +51 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/shared/types.ts +88 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/retry.ts +61 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/sleep.ts +79 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
- package/node_modules/appium-chromedriver/node_modules/asyncbox/package.json +60 -0
- package/node_modules/appium-chromedriver/package.json +4 -4
- package/node_modules/io.appium.settings/CHANGELOG.md +21 -0
- package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts +9 -0
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.js +16 -1
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/constants.d.ts +2 -0
- package/node_modules/io.appium.settings/build/lib/constants.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/constants.js +2 -0
- package/node_modules/io.appium.settings/build/lib/constants.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/index.d.ts +3 -0
- package/node_modules/io.appium.settings/build/lib/index.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts +3 -1
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js +2 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts +11 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js +40 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js.map +1 -1
- package/node_modules/io.appium.settings/lib/commands/video-stream.ts +17 -0
- package/node_modules/io.appium.settings/lib/constants.ts +2 -0
- package/node_modules/io.appium.settings/lib/index.ts +3 -0
- package/node_modules/io.appium.settings/lib/utils/streaming-protocol.ts +2 -0
- package/node_modules/io.appium.settings/lib/utils/streaming-transport.ts +43 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/LICENSE +203 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/README.md +272 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts +12 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js +10 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js +2 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js +53 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/index.ts +28 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/lock/lock.ts +369 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/errors.ts +51 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/types.ts +88 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/retry.ts +61 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/sleep.ts +79 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
- package/node_modules/io.appium.settings/node_modules/asyncbox/package.json +60 -0
- package/node_modules/io.appium.settings/package.json +5 -5
- package/node_modules/teen_process/CHANGELOG.md +17 -0
- package/node_modules/teen_process/README.md +2 -2
- package/node_modules/teen_process/build/lib/circular-buffer.d.ts +13 -0
- package/node_modules/teen_process/build/lib/circular-buffer.d.ts.map +1 -0
- package/node_modules/teen_process/build/lib/circular-buffer.js +53 -0
- package/node_modules/teen_process/build/lib/circular-buffer.js.map +1 -0
- package/node_modules/teen_process/build/lib/exec.d.ts +33 -0
- package/node_modules/teen_process/build/lib/exec.d.ts.map +1 -0
- package/node_modules/teen_process/build/lib/exec.js +164 -0
- package/node_modules/teen_process/build/lib/exec.js.map +1 -0
- package/node_modules/teen_process/build/lib/helpers.d.ts +2 -0
- package/node_modules/teen_process/build/lib/helpers.d.ts.map +1 -0
- package/node_modules/teen_process/build/lib/helpers.js +41 -0
- package/node_modules/teen_process/build/lib/helpers.js.map +1 -0
- package/node_modules/teen_process/build/lib/index.d.ts +5 -0
- package/node_modules/teen_process/build/lib/index.d.ts.map +1 -0
- package/node_modules/teen_process/build/lib/index.js +4 -0
- package/node_modules/teen_process/build/lib/index.js.map +1 -0
- package/node_modules/teen_process/build/lib/subprocess.d.ts +131 -0
- package/node_modules/teen_process/build/lib/subprocess.d.ts.map +1 -0
- package/node_modules/teen_process/build/lib/subprocess.js +336 -0
- package/node_modules/teen_process/build/lib/subprocess.js.map +1 -0
- package/node_modules/teen_process/build/lib/types.d.ts +71 -0
- package/node_modules/teen_process/build/lib/types.d.ts.map +1 -0
- package/node_modules/teen_process/build/lib/types.js +2 -0
- package/node_modules/teen_process/build/lib/types.js.map +1 -0
- package/node_modules/teen_process/lib/exec.ts +15 -2
- package/node_modules/teen_process/lib/subprocess.ts +146 -110
- package/node_modules/teen_process/package.json +14 -25
- package/package.json +5 -5
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/package.json +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.d.ts +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.d.ts.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.js +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.js.map +0 -0
- /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/package.json +0 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import {randomUUID} from 'node:crypto';
|
|
2
|
+
import type {EventEmitter} from 'node:events';
|
|
3
|
+
|
|
4
|
+
import type {AppiumLogger, BiDiBackpressureEvent, BiDiEvent} from '@appium/types';
|
|
5
|
+
import type {AccessUnit, JpegFrame, JpegStreamSession, VideoStreamSession} from 'io.appium.settings';
|
|
6
|
+
|
|
7
|
+
import {UnitBatcher} from './batcher.js';
|
|
8
|
+
import {
|
|
9
|
+
AUDIO_CHANNELS,
|
|
10
|
+
AUDIO_SAMPLE_RATE,
|
|
11
|
+
BACKPRESSURE_EVENT_NAME,
|
|
12
|
+
FIRST_UNIT_TIMEOUT_MS,
|
|
13
|
+
KEYFRAME_REQUEST_MIN_INTERVAL_MS,
|
|
14
|
+
MEDIA_ENDED_EVENT,
|
|
15
|
+
MEDIA_FORMAT_CHANGED_EVENT,
|
|
16
|
+
MEDIA_STARTED_EVENT,
|
|
17
|
+
MEDIA_STREAM_MODULE,
|
|
18
|
+
MEDIA_UNITS_EVENT,
|
|
19
|
+
} from './constants.js';
|
|
20
|
+
import {readJpegSize} from './jpeg.js';
|
|
21
|
+
import {parseVideoSize} from './sps.js';
|
|
22
|
+
import type {MediaStreamInfo, MediaUnit, StartMediaStreamOpts, WireUnit} from './types.js';
|
|
23
|
+
|
|
24
|
+
export interface MediaStreamDeps {
|
|
25
|
+
emit: (event: BiDiEvent) => void;
|
|
26
|
+
emitter: EventEmitter;
|
|
27
|
+
hasSubscribers: () => boolean;
|
|
28
|
+
log: AppiumLogger;
|
|
29
|
+
onEnded: (streamId: string) => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Owns one settings-app stream session and republishes its units as
|
|
34
|
+
* `appium:mediaStream.*` BiDi events (config inlined, droppable hints).
|
|
35
|
+
*/
|
|
36
|
+
export class MediaStream {
|
|
37
|
+
readonly streamId = randomUUID();
|
|
38
|
+
readonly kind: StartMediaStreamOpts['kind'];
|
|
39
|
+
|
|
40
|
+
private readonly batcher: UnitBatcher;
|
|
41
|
+
private config?: Buffer;
|
|
42
|
+
private configCount = 0;
|
|
43
|
+
private videoSynced = false;
|
|
44
|
+
private wasSubscribed = false;
|
|
45
|
+
private lastKeyFrameRequestAt = 0;
|
|
46
|
+
private jpegSeq = 0;
|
|
47
|
+
private lastJpeg?: MediaUnit;
|
|
48
|
+
private lastJpegEmitAt = 0;
|
|
49
|
+
private size?: {width: number; height: number};
|
|
50
|
+
private dropped = 0;
|
|
51
|
+
private heartbeat?: NodeJS.Timeout;
|
|
52
|
+
private pump?: Promise<void>;
|
|
53
|
+
// Whether the device-side session is ours to stop (false if another client's stream was found running)
|
|
54
|
+
private owned = false;
|
|
55
|
+
private announced = false;
|
|
56
|
+
private endReason = 'ended';
|
|
57
|
+
private firstUnitSeen!: () => void;
|
|
58
|
+
private readonly firstUnit = new Promise<void>((resolve) => (this.firstUnitSeen = resolve));
|
|
59
|
+
private stopped = false;
|
|
60
|
+
private get videoChain(): string {
|
|
61
|
+
return `${this.streamId}:video`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
constructor(
|
|
65
|
+
private readonly session: VideoStreamSession | JpegStreamSession,
|
|
66
|
+
private readonly opts: StartMediaStreamOpts & {batchMs: number; idleHeartbeatMs: number},
|
|
67
|
+
private readonly deps: MediaStreamDeps,
|
|
68
|
+
) {
|
|
69
|
+
this.kind = opts.kind;
|
|
70
|
+
this.batcher = new UnitBatcher(opts.kind === 'jpeg' ? 0 : opts.batchMs, (units) => this.emitUnits(units));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async start(): Promise<MediaStreamInfo> {
|
|
74
|
+
const {opts} = this;
|
|
75
|
+
if (this.stopped) {
|
|
76
|
+
throw new Error('The stream was stopped before it started');
|
|
77
|
+
}
|
|
78
|
+
// A start() that throws may still have brought the on-device service up, so it is ours
|
|
79
|
+
this.owned = true;
|
|
80
|
+
let started: boolean;
|
|
81
|
+
try {
|
|
82
|
+
started =
|
|
83
|
+
opts.kind === 'video'
|
|
84
|
+
? await (this.session as VideoStreamSession).start({
|
|
85
|
+
codec: opts.codec,
|
|
86
|
+
fps: opts.fps,
|
|
87
|
+
bitrate: opts.bitrate,
|
|
88
|
+
resolution: opts.resolution,
|
|
89
|
+
audio: opts.audio,
|
|
90
|
+
})
|
|
91
|
+
: await (this.session as JpegStreamSession).start({fps: opts.fps, quality: opts.quality, scale: opts.scale});
|
|
92
|
+
} catch (e) {
|
|
93
|
+
// Option validation runs before the device is touched, so there is nothing of ours to stop
|
|
94
|
+
if (e instanceof TypeError || e instanceof RangeError) {
|
|
95
|
+
this.owned = false;
|
|
96
|
+
}
|
|
97
|
+
if (this.owned && this.stopped) {
|
|
98
|
+
// finish() already ran and skipped the device session, which may be half up
|
|
99
|
+
await this.session.stop().catch(() => {});
|
|
100
|
+
}
|
|
101
|
+
throw e;
|
|
102
|
+
}
|
|
103
|
+
if (this.stopped) {
|
|
104
|
+
// Stopped while the device session was starting: finish() may have run before it was up
|
|
105
|
+
await this.session.stop().catch(() => {});
|
|
106
|
+
throw new Error('The stream was stopped while it was starting');
|
|
107
|
+
}
|
|
108
|
+
if (!started) {
|
|
109
|
+
// The device already runs a stream of this kind that is not ours: leave it alone
|
|
110
|
+
this.owned = false;
|
|
111
|
+
throw new Error(`Another ${opts.kind} stream is already running on the device`);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
this.deps.emitter.on(BACKPRESSURE_EVENT_NAME, this.onBackpressure);
|
|
115
|
+
if (opts.kind === 'jpeg' && opts.idleHeartbeatMs > 0) {
|
|
116
|
+
this.heartbeat = setInterval(() => this.replayLastJpeg(), opts.idleHeartbeatMs);
|
|
117
|
+
}
|
|
118
|
+
this.pump = this.runPump();
|
|
119
|
+
if (opts.kind === 'jpeg') {
|
|
120
|
+
// A static screen yields no frames, so there is nothing to wait for
|
|
121
|
+
this.announce();
|
|
122
|
+
} else {
|
|
123
|
+
await this.waitForFirstUnit(this.pump);
|
|
124
|
+
}
|
|
125
|
+
return this.info();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Fails fast if the device encoder rejected the configuration (the on-device session
|
|
129
|
+
// then ends without any output) or never produced anything
|
|
130
|
+
private async waitForFirstUnit(pump: Promise<void>): Promise<void> {
|
|
131
|
+
let timer: NodeJS.Timeout | undefined;
|
|
132
|
+
const hint =
|
|
133
|
+
'The device encoder may not support the requested configuration, check the logcat of io.appium.settings.';
|
|
134
|
+
try {
|
|
135
|
+
await Promise.race([
|
|
136
|
+
this.firstUnit,
|
|
137
|
+
new Promise<never>((_resolve, reject) => {
|
|
138
|
+
timer = setTimeout(
|
|
139
|
+
() =>
|
|
140
|
+
reject(
|
|
141
|
+
new Error(`The ${this.kind} stream produced no output within ${FIRST_UNIT_TIMEOUT_MS}ms. ${hint}`),
|
|
142
|
+
),
|
|
143
|
+
FIRST_UNIT_TIMEOUT_MS,
|
|
144
|
+
);
|
|
145
|
+
}),
|
|
146
|
+
pump.then(() => {
|
|
147
|
+
throw new Error(`The ${this.kind} stream ended before producing any output (${this.endReason}). ${hint}`);
|
|
148
|
+
}),
|
|
149
|
+
]);
|
|
150
|
+
} finally {
|
|
151
|
+
clearTimeout(timer);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
private announce(): void {
|
|
156
|
+
if (this.announced || this.stopped) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.announced = true;
|
|
160
|
+
this.deps.emit({method: MEDIA_STARTED_EVENT, params: {...this.info()}});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
get isStopped(): boolean {
|
|
164
|
+
return this.stopped;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** Idempotent; resolves once the stream is torn down and its pump has finished. */
|
|
168
|
+
async stop(reason = 'stopped'): Promise<void> {
|
|
169
|
+
await this.finish(reason);
|
|
170
|
+
await this.pump?.catch(() => {});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Must not await the pump: it is also called from inside the pump itself
|
|
174
|
+
private async finish(reason: string): Promise<void> {
|
|
175
|
+
if (this.stopped) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
this.stopped = true;
|
|
179
|
+
clearInterval(this.heartbeat);
|
|
180
|
+
this.batcher.close();
|
|
181
|
+
this.deps.emitter.off(BACKPRESSURE_EVENT_NAME, this.onBackpressure);
|
|
182
|
+
if (this.owned) {
|
|
183
|
+
try {
|
|
184
|
+
await this.session.stop();
|
|
185
|
+
} catch (e) {
|
|
186
|
+
this.deps.log.warn(`Cannot stop the ${this.kind} stream session: ${(e as Error).message}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (this.announced) {
|
|
190
|
+
this.deps.emit({method: MEDIA_ENDED_EVENT, params: {streamId: this.streamId, reason}});
|
|
191
|
+
}
|
|
192
|
+
this.deps.onEnded(this.streamId);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
private info(): MediaStreamInfo {
|
|
196
|
+
const {opts} = this;
|
|
197
|
+
const isVideo = opts.kind === 'video';
|
|
198
|
+
return {
|
|
199
|
+
streamId: this.streamId,
|
|
200
|
+
kind: opts.kind,
|
|
201
|
+
tracks: isVideo ? (opts.audio ? ['video', 'audio'] : ['video']) : ['jpeg'],
|
|
202
|
+
codec: isVideo ? (opts.codec ?? 'h264') : 'jpeg',
|
|
203
|
+
event: MEDIA_STREAM_MODULE,
|
|
204
|
+
...this.size,
|
|
205
|
+
...(isVideo && opts.audio ? {audio: {sampleRate: AUDIO_SAMPLE_RATE, channels: AUDIO_CHANNELS}} : {}),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
private async runPump(): Promise<void> {
|
|
210
|
+
let reason = 'ended';
|
|
211
|
+
try {
|
|
212
|
+
if (this.kind === 'video') {
|
|
213
|
+
for await (const au of (this.session as VideoStreamSession).accessUnits()) {
|
|
214
|
+
this.onAccessUnit(au);
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
for await (const frame of (this.session as JpegStreamSession).frames()) {
|
|
218
|
+
this.onJpegFrame(frame);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
} catch (e) {
|
|
222
|
+
reason = `error: ${(e as Error).message}`;
|
|
223
|
+
}
|
|
224
|
+
this.endReason = reason;
|
|
225
|
+
await this.finish(reason);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
private onAccessUnit(au: AccessUnit): void {
|
|
229
|
+
if (this.stopped) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (au.track === 'video' && au.isConfig) {
|
|
233
|
+
// Config is never forwarded; it is prepended to every keyframe instead
|
|
234
|
+
this.config = au.data;
|
|
235
|
+
// A restarted encoder needs a keyframe of its own before deltas are forwarded
|
|
236
|
+
this.videoSynced = false;
|
|
237
|
+
this.onVideoConfig(au.data);
|
|
238
|
+
}
|
|
239
|
+
if (au.track === 'audio' && !this.announced) {
|
|
240
|
+
// Audio may precede the video config; `started` must carry the video size
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
// The config unit counts too: it is the first thing the encoder reports
|
|
244
|
+
this.announce();
|
|
245
|
+
this.firstUnitSeen();
|
|
246
|
+
if (au.track === 'video' && au.isConfig) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const subscribed = this.deps.hasSubscribers();
|
|
250
|
+
if (subscribed && !this.wasSubscribed) {
|
|
251
|
+
// Late joiner: keyframes are rare on a slowly changing screen, so ask for one
|
|
252
|
+
this.requestKeyFrame();
|
|
253
|
+
}
|
|
254
|
+
this.wasSubscribed = subscribed;
|
|
255
|
+
if (!subscribed) {
|
|
256
|
+
this.videoSynced = false;
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
const unit: MediaUnit = {
|
|
260
|
+
track: au.track,
|
|
261
|
+
seq: au.sequence,
|
|
262
|
+
ts: au.timestampMicros,
|
|
263
|
+
key: au.track === 'audio' ? true : au.isKeyFrame,
|
|
264
|
+
data: au.data,
|
|
265
|
+
};
|
|
266
|
+
if (au.track === 'video') {
|
|
267
|
+
if (au.isKeyFrame) {
|
|
268
|
+
this.videoSynced = true;
|
|
269
|
+
unit.data = this.config ? Buffer.concat([this.config, au.data]) : au.data;
|
|
270
|
+
} else if (!this.videoSynced) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
this.batcher.push(unit);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// The first config sets the size announced in `started`; later ones are a restart of the
|
|
278
|
+
// encoder (rotation), announced with the new size if it can be read from the SPS
|
|
279
|
+
private onVideoConfig(config: Buffer): void {
|
|
280
|
+
const size = parseVideoSize(config, this.opts.codec ?? 'h264');
|
|
281
|
+
const isFirst = this.configCount++ === 0;
|
|
282
|
+
const changed = !size || size.width !== this.size?.width || size.height !== this.size?.height;
|
|
283
|
+
if (size) {
|
|
284
|
+
this.size = size;
|
|
285
|
+
}
|
|
286
|
+
if (!isFirst) {
|
|
287
|
+
// Units of the previous format must reach clients before the new format is announced
|
|
288
|
+
this.batcher.flush();
|
|
289
|
+
}
|
|
290
|
+
if (!isFirst && changed) {
|
|
291
|
+
this.deps.emit({method: MEDIA_FORMAT_CHANGED_EVENT, params: {streamId: this.streamId, ...size}});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
private onJpegFrame(frame: JpegFrame): void {
|
|
296
|
+
if (this.stopped) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
const unit: MediaUnit = {
|
|
300
|
+
track: 'jpeg',
|
|
301
|
+
seq: this.jpegSeq++,
|
|
302
|
+
ts: frame.timestampMicros,
|
|
303
|
+
key: true,
|
|
304
|
+
data: frame.data,
|
|
305
|
+
};
|
|
306
|
+
this.lastJpeg = unit;
|
|
307
|
+
this.checkSize(frame.data);
|
|
308
|
+
if (this.deps.hasSubscribers()) {
|
|
309
|
+
this.lastJpegEmitAt = Date.now();
|
|
310
|
+
this.batcher.push(unit);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
private replayLastJpeg(): void {
|
|
315
|
+
if (
|
|
316
|
+
this.stopped ||
|
|
317
|
+
!this.lastJpeg ||
|
|
318
|
+
Date.now() - this.lastJpegEmitAt < this.opts.idleHeartbeatMs ||
|
|
319
|
+
!this.deps.hasSubscribers()
|
|
320
|
+
) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
this.lastJpegEmitAt = Date.now();
|
|
324
|
+
this.batcher.push({...this.lastJpeg, seq: this.jpegSeq++});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
private checkSize(jpeg: Buffer): void {
|
|
328
|
+
const size = readJpegSize(jpeg);
|
|
329
|
+
if (!size || (size.width === this.size?.width && size.height === this.size?.height)) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
this.size = size;
|
|
333
|
+
this.deps.emit({method: MEDIA_FORMAT_CHANGED_EVENT, params: {streamId: this.streamId, ...size}});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
private emitUnits(units: MediaUnit[]): void {
|
|
337
|
+
const [first] = units;
|
|
338
|
+
const delivery: BiDiEvent['delivery'] =
|
|
339
|
+
first.track === 'audio'
|
|
340
|
+
? {policy: 'reliable'}
|
|
341
|
+
: first.track === 'jpeg'
|
|
342
|
+
? {policy: 'droppable'}
|
|
343
|
+
: {policy: 'droppable', chain: this.videoChain, syncPoint: first.key};
|
|
344
|
+
const dropped = this.dropped;
|
|
345
|
+
this.dropped = 0;
|
|
346
|
+
this.deps.emit({
|
|
347
|
+
method: MEDIA_UNITS_EVENT,
|
|
348
|
+
params: {streamId: this.streamId, units: units.map(toWireUnit), dropped},
|
|
349
|
+
delivery,
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
private requestKeyFrame(): void {
|
|
354
|
+
const now = Date.now();
|
|
355
|
+
if (this.kind !== 'video' || now - this.lastKeyFrameRequestAt < KEYFRAME_REQUEST_MIN_INTERVAL_MS) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
this.lastKeyFrameRequestAt = now;
|
|
359
|
+
void this.sendKeyFrameRequest();
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
private async sendKeyFrameRequest(): Promise<void> {
|
|
363
|
+
try {
|
|
364
|
+
const sent = await (this.session as VideoStreamSession).requestKeyFrame();
|
|
365
|
+
this.deps.log.debug(`Keyframe request for stream ${this.streamId}: ${sent ? 'sent' : 'unsupported'}`);
|
|
366
|
+
} catch (e) {
|
|
367
|
+
this.deps.log.debug(`Keyframe request for stream ${this.streamId} failed: ${(e as Error).message}`);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
private onBackpressure = (ev: BiDiBackpressureEvent): void => {
|
|
372
|
+
// The shared emitter reports all streams: video drops carry its chain, JPEG ones have none
|
|
373
|
+
if (ev.method !== MEDIA_UNITS_EVENT || ev.chain !== (this.kind === 'video' ? this.videoChain : undefined)) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
// Core skips the video chain until a sync point; get one without waiting for the GOP
|
|
377
|
+
this.requestKeyFrame();
|
|
378
|
+
this.dropped = Math.max(this.dropped, ev.dropped);
|
|
379
|
+
this.deps.log.debug(`BiDi backpressure for stream ${this.streamId}: ${ev.state} (dropped=${ev.dropped})`);
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function toWireUnit(u: MediaUnit): WireUnit {
|
|
384
|
+
return {track: u.track, seq: u.seq, ts: u.ts, key: u.key, data: u.data.toString('base64')};
|
|
385
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type {BiDiEvent} from '@appium/types';
|
|
2
|
+
|
|
3
|
+
export type MediaKind = 'video' | 'jpeg';
|
|
4
|
+
export type MediaTrack = 'video' | 'audio' | 'jpeg';
|
|
5
|
+
|
|
6
|
+
/** A contract unit; video config is already inlined into keyframes. */
|
|
7
|
+
export interface MediaUnit {
|
|
8
|
+
track: MediaTrack;
|
|
9
|
+
seq: number;
|
|
10
|
+
ts: number;
|
|
11
|
+
key: boolean;
|
|
12
|
+
data: Buffer;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** The JSON shape of a unit inside `appium:mediaStream.units` */
|
|
16
|
+
export interface WireUnit extends Omit<MediaUnit, 'data'> {
|
|
17
|
+
data: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface StartMediaStreamOpts {
|
|
21
|
+
kind: MediaKind;
|
|
22
|
+
codec?: 'h264' | 'hevc';
|
|
23
|
+
fps?: number;
|
|
24
|
+
bitrate?: number;
|
|
25
|
+
quality?: number;
|
|
26
|
+
scale?: number;
|
|
27
|
+
resolution?: string;
|
|
28
|
+
audio?: boolean;
|
|
29
|
+
/** Batching window for video/audio units; JPEG is never batched */
|
|
30
|
+
batchMs?: number;
|
|
31
|
+
/** Re-emit the last JPEG after this much idle time (0 disables) */
|
|
32
|
+
idleHeartbeatMs?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface MediaStreamInfo {
|
|
36
|
+
streamId: string;
|
|
37
|
+
kind: MediaKind;
|
|
38
|
+
tracks: MediaTrack[];
|
|
39
|
+
codec: 'h264' | 'hevc' | 'jpeg';
|
|
40
|
+
event: string;
|
|
41
|
+
width?: number;
|
|
42
|
+
height?: number;
|
|
43
|
+
audio?: {sampleRate: number; channels: number};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type MediaBiDiEvent = BiDiEvent;
|
|
47
|
+
|
|
48
|
+
export interface VideoEncoderInfo {
|
|
49
|
+
name: string;
|
|
50
|
+
codec: 'h264' | 'hevc';
|
|
51
|
+
softwareOnly: boolean;
|
|
52
|
+
/** Largest frame size the encoder accepts; the stream is scaled down to fit it */
|
|
53
|
+
maxWidth?: number;
|
|
54
|
+
maxHeight?: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface MediaStreamCapabilities {
|
|
58
|
+
supported: boolean;
|
|
59
|
+
reason?: {code: 'api_level_too_low' | 'settings_app_missing'; message: string};
|
|
60
|
+
apiLevel: number;
|
|
61
|
+
kinds: MediaKind[];
|
|
62
|
+
audio?: boolean;
|
|
63
|
+
/** Video encoders per codec; null if the device does not list its codecs */
|
|
64
|
+
codecs?: {h264: VideoEncoderInfo[]; hevc: VideoEncoderInfo[]} | null;
|
|
65
|
+
}
|
|
@@ -153,6 +153,13 @@ import {
|
|
|
153
153
|
mobileStartMediaProjectionRecording,
|
|
154
154
|
mobileStopMediaProjectionRecording,
|
|
155
155
|
} from './commands/media-projection.js';
|
|
156
|
+
import {
|
|
157
|
+
mobileGetMediaStreamCapabilities,
|
|
158
|
+
mobileStartMediaStream,
|
|
159
|
+
mobileStopMediaStream,
|
|
160
|
+
stopAllMediaStreams,
|
|
161
|
+
} from './commands/media-stream/exports.js';
|
|
162
|
+
import type {MediaStream} from './commands/media-stream/stream.js';
|
|
156
163
|
import {mobileSendTrimMemory} from './commands/memory.js';
|
|
157
164
|
import {
|
|
158
165
|
getWindowRect,
|
|
@@ -223,6 +230,7 @@ import './commands/permissions.js';
|
|
|
223
230
|
import './commands/recordscreen.js';
|
|
224
231
|
import './commands/resources.js';
|
|
225
232
|
import './commands/shell.js';
|
|
233
|
+
import './commands/media-stream/exports.js';
|
|
226
234
|
import './commands/streamscreen.js';
|
|
227
235
|
import './commands/system-bars.js';
|
|
228
236
|
import './commands/time.js';
|
|
@@ -257,6 +265,8 @@ class AndroidDriver<C extends AndroidDriverConstraints = AndroidDriverConstraint
|
|
|
257
265
|
_wasWindowAnimationDisabled?: boolean;
|
|
258
266
|
_cachedActivityArgs: StringRecord;
|
|
259
267
|
_screenStreamingProps?: ScreenStreamingProps;
|
|
268
|
+
_mediaStreams?: Map<string, MediaStream>;
|
|
269
|
+
_endedMediaStreamIds?: Set<string>;
|
|
260
270
|
_screenRecordingProperties?: ScreenRecordingProperties;
|
|
261
271
|
_logcatWebsocketListener?: LogcatListener;
|
|
262
272
|
_bidiServerLogListener?: (...args: any[]) => void;
|
|
@@ -350,6 +360,7 @@ class AndroidDriver<C extends AndroidDriverConstraints = AndroidDriverConstraint
|
|
|
350
360
|
|
|
351
361
|
override async deleteSession(sessionId?: string | null) {
|
|
352
362
|
await removeAllSessionWebSocketHandlers.bind(this)();
|
|
363
|
+
await stopAllMediaStreams.bind(this)();
|
|
353
364
|
|
|
354
365
|
try {
|
|
355
366
|
this.adb?.logcat?.removeAllListeners();
|
|
@@ -588,6 +599,11 @@ Object.assign(AndroidDriver.prototype, {
|
|
|
588
599
|
// shell
|
|
589
600
|
mobileShell,
|
|
590
601
|
|
|
602
|
+
// media-stream
|
|
603
|
+
mobileGetMediaStreamCapabilities,
|
|
604
|
+
mobileStartMediaStream,
|
|
605
|
+
mobileStopMediaStream,
|
|
606
|
+
|
|
591
607
|
// streamscreen
|
|
592
608
|
mobileStartScreenStreaming,
|
|
593
609
|
mobileStopScreenStreaming,
|
|
@@ -245,6 +245,23 @@ export const executeMethodMap = {
|
|
|
245
245
|
},
|
|
246
246
|
},
|
|
247
247
|
|
|
248
|
+
'mobile: startMediaStream': {
|
|
249
|
+
command: 'mobileStartMediaStream',
|
|
250
|
+
params: {
|
|
251
|
+
required: ['kind'],
|
|
252
|
+
optional: ['codec', 'fps', 'bitrate', 'quality', 'scale', 'resolution', 'audio', 'batchMs', 'idleHeartbeatMs'],
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
'mobile: getMediaStreamCapabilities': {
|
|
256
|
+
command: 'mobileGetMediaStreamCapabilities',
|
|
257
|
+
},
|
|
258
|
+
'mobile: stopMediaStream': {
|
|
259
|
+
command: 'mobileStopMediaStream',
|
|
260
|
+
params: {
|
|
261
|
+
required: ['streamId'],
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
|
|
248
265
|
'mobile: startMediaProjectionRecording': {
|
|
249
266
|
command: 'mobileStartMediaProjectionRecording',
|
|
250
267
|
params: {
|