appium-xcuitest-driver 13.1.3 → 13.3.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.
Files changed (189) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/media-stream.d.ts +34 -0
  3. package/build/lib/commands/media-stream.d.ts.map +1 -0
  4. package/build/lib/commands/media-stream.js +230 -0
  5. package/build/lib/commands/media-stream.js.map +1 -0
  6. package/build/lib/device/media-stream/batcher.d.ts +17 -0
  7. package/build/lib/device/media-stream/batcher.d.ts.map +1 -0
  8. package/build/lib/device/media-stream/batcher.js +48 -0
  9. package/build/lib/device/media-stream/batcher.js.map +1 -0
  10. package/build/lib/device/media-stream/constants.d.ts +20 -0
  11. package/build/lib/device/media-stream/constants.d.ts.map +1 -0
  12. package/build/lib/device/media-stream/constants.js +23 -0
  13. package/build/lib/device/media-stream/constants.js.map +1 -0
  14. package/build/lib/device/media-stream/device-source.d.ts +39 -0
  15. package/build/lib/device/media-stream/device-source.d.ts.map +1 -0
  16. package/build/lib/device/media-stream/device-source.js +229 -0
  17. package/build/lib/device/media-stream/device-source.js.map +1 -0
  18. package/build/lib/device/media-stream/jpeg.d.ts +6 -0
  19. package/build/lib/device/media-stream/jpeg.d.ts.map +1 -0
  20. package/build/lib/device/media-stream/jpeg.js +17 -0
  21. package/build/lib/device/media-stream/jpeg.js.map +1 -0
  22. package/build/lib/device/media-stream/media-proxy.d.ts +13 -0
  23. package/build/lib/device/media-stream/media-proxy.d.ts.map +1 -0
  24. package/build/lib/device/media-stream/media-proxy.js +33 -0
  25. package/build/lib/device/media-stream/media-proxy.js.map +1 -0
  26. package/build/lib/device/media-stream/orientation.d.ts +22 -0
  27. package/build/lib/device/media-stream/orientation.d.ts.map +1 -0
  28. package/build/lib/device/media-stream/orientation.js +35 -0
  29. package/build/lib/device/media-stream/orientation.js.map +1 -0
  30. package/build/lib/device/media-stream/simulator-source.d.ts +16 -0
  31. package/build/lib/device/media-stream/simulator-source.d.ts.map +1 -0
  32. package/build/lib/device/media-stream/simulator-source.js +45 -0
  33. package/build/lib/device/media-stream/simulator-source.js.map +1 -0
  34. package/build/lib/device/media-stream/sps.d.ts +12 -0
  35. package/build/lib/device/media-stream/sps.d.ts.map +1 -0
  36. package/build/lib/device/media-stream/sps.js +196 -0
  37. package/build/lib/device/media-stream/sps.js.map +1 -0
  38. package/build/lib/device/media-stream/stream.d.ts +70 -0
  39. package/build/lib/device/media-stream/stream.d.ts.map +1 -0
  40. package/build/lib/device/media-stream/stream.js +356 -0
  41. package/build/lib/device/media-stream/stream.js.map +1 -0
  42. package/build/lib/device/media-stream/types.d.ts +73 -0
  43. package/build/lib/device/media-stream/types.d.ts.map +1 -0
  44. package/build/lib/device/media-stream/types.js +2 -0
  45. package/build/lib/device/media-stream/types.js.map +1 -0
  46. package/build/lib/driver.d.ts +20 -0
  47. package/build/lib/driver.d.ts.map +1 -1
  48. package/build/lib/driver.js +17 -6
  49. package/build/lib/driver.js.map +1 -1
  50. package/build/lib/execute-method-map.d.ts +16 -0
  51. package/build/lib/execute-method-map.d.ts.map +1 -1
  52. package/build/lib/execute-method-map.js +16 -0
  53. package/build/lib/execute-method-map.js.map +1 -1
  54. package/lib/commands/media-stream.ts +315 -0
  55. package/lib/device/media-stream/batcher.ts +51 -0
  56. package/lib/device/media-stream/constants.ts +22 -0
  57. package/lib/device/media-stream/device-source.ts +265 -0
  58. package/lib/device/media-stream/jpeg.ts +16 -0
  59. package/lib/device/media-stream/media-proxy.ts +45 -0
  60. package/lib/device/media-stream/orientation.ts +55 -0
  61. package/lib/device/media-stream/simulator-source.ts +55 -0
  62. package/lib/device/media-stream/sps.ts +208 -0
  63. package/lib/device/media-stream/stream.ts +404 -0
  64. package/lib/device/media-stream/types.ts +83 -0
  65. package/lib/driver.ts +18 -7
  66. package/lib/execute-method-map.ts +16 -0
  67. package/node_modules/@appium/media-proxy/CHANGELOG.md +33 -0
  68. package/node_modules/@appium/media-proxy/LICENSE +201 -0
  69. package/node_modules/@appium/media-proxy/README.md +185 -0
  70. package/node_modules/@appium/media-proxy/THIRD_PARTY_NOTICES.md +29 -0
  71. package/node_modules/@appium/media-proxy/binding.gyp +90 -0
  72. package/node_modules/@appium/media-proxy/lib/src/background.d.ts +5 -0
  73. package/node_modules/@appium/media-proxy/lib/src/background.d.ts.map +1 -0
  74. package/node_modules/@appium/media-proxy/lib/src/background.js +16 -0
  75. package/node_modules/@appium/media-proxy/lib/src/background.js.map +1 -0
  76. package/node_modules/@appium/media-proxy/lib/src/capabilities.d.ts +9 -0
  77. package/node_modules/@appium/media-proxy/lib/src/capabilities.d.ts.map +1 -0
  78. package/node_modules/@appium/media-proxy/lib/src/capabilities.js +11 -0
  79. package/node_modules/@appium/media-proxy/lib/src/capabilities.js.map +1 -0
  80. package/node_modules/@appium/media-proxy/lib/src/errors.d.ts +26 -0
  81. package/node_modules/@appium/media-proxy/lib/src/errors.d.ts.map +1 -0
  82. package/node_modules/@appium/media-proxy/lib/src/errors.js +40 -0
  83. package/node_modules/@appium/media-proxy/lib/src/errors.js.map +1 -0
  84. package/node_modules/@appium/media-proxy/lib/src/framing/apst.d.ts +43 -0
  85. package/node_modules/@appium/media-proxy/lib/src/framing/apst.d.ts.map +1 -0
  86. package/node_modules/@appium/media-proxy/lib/src/framing/apst.js +126 -0
  87. package/node_modules/@appium/media-proxy/lib/src/framing/apst.js.map +1 -0
  88. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-http.d.ts +30 -0
  89. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-http.d.ts.map +1 -0
  90. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-http.js +148 -0
  91. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-http.js.map +1 -0
  92. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-multipart.d.ts +11 -0
  93. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-multipart.d.ts.map +1 -0
  94. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-multipart.js +26 -0
  95. package/node_modules/@appium/media-proxy/lib/src/framing/mjpeg-multipart.js.map +1 -0
  96. package/node_modules/@appium/media-proxy/lib/src/index.d.ts +10 -0
  97. package/node_modules/@appium/media-proxy/lib/src/index.d.ts.map +1 -0
  98. package/node_modules/@appium/media-proxy/lib/src/index.js +7 -0
  99. package/node_modules/@appium/media-proxy/lib/src/index.js.map +1 -0
  100. package/node_modules/@appium/media-proxy/lib/src/native.d.ts +12 -0
  101. package/node_modules/@appium/media-proxy/lib/src/native.d.ts.map +1 -0
  102. package/node_modules/@appium/media-proxy/lib/src/native.js +36 -0
  103. package/node_modules/@appium/media-proxy/lib/src/native.js.map +1 -0
  104. package/node_modules/@appium/media-proxy/lib/src/pkg-root.d.ts +6 -0
  105. package/node_modules/@appium/media-proxy/lib/src/pkg-root.d.ts.map +1 -0
  106. package/node_modules/@appium/media-proxy/lib/src/pkg-root.js +12 -0
  107. package/node_modules/@appium/media-proxy/lib/src/pkg-root.js.map +1 -0
  108. package/node_modules/@appium/media-proxy/lib/src/queue.d.ts +34 -0
  109. package/node_modules/@appium/media-proxy/lib/src/queue.d.ts.map +1 -0
  110. package/node_modules/@appium/media-proxy/lib/src/queue.js +123 -0
  111. package/node_modules/@appium/media-proxy/lib/src/queue.js.map +1 -0
  112. package/node_modules/@appium/media-proxy/lib/src/transcoder.d.ts +81 -0
  113. package/node_modules/@appium/media-proxy/lib/src/transcoder.d.ts.map +1 -0
  114. package/node_modules/@appium/media-proxy/lib/src/transcoder.js +422 -0
  115. package/node_modules/@appium/media-proxy/lib/src/transcoder.js.map +1 -0
  116. package/node_modules/@appium/media-proxy/lib/src/types.d.ts +147 -0
  117. package/node_modules/@appium/media-proxy/lib/src/types.d.ts.map +1 -0
  118. package/node_modules/@appium/media-proxy/lib/src/types.js +2 -0
  119. package/node_modules/@appium/media-proxy/lib/src/types.js.map +1 -0
  120. package/node_modules/@appium/media-proxy/package.json +67 -0
  121. package/node_modules/@appium/media-proxy/prebuilds/darwin-arm64/@appium+media-proxy.node +0 -0
  122. package/node_modules/@appium/media-proxy/prebuilds/darwin-arm64/ffmpeg-LICENSE-LGPL-2.1.txt +502 -0
  123. package/node_modules/@appium/media-proxy/prebuilds/darwin-arm64/ffmpeg-build-info.txt +3 -0
  124. package/node_modules/@appium/media-proxy/prebuilds/darwin-arm64/libavcodec-appium.62.dylib +0 -0
  125. package/node_modules/@appium/media-proxy/prebuilds/darwin-arm64/libavutil-appium.60.dylib +0 -0
  126. package/node_modules/@appium/media-proxy/prebuilds/darwin-arm64/libswscale-appium.9.dylib +0 -0
  127. package/node_modules/@appium/media-proxy/prebuilds/linux-arm64/@appium+media-proxy.node +0 -0
  128. package/node_modules/@appium/media-proxy/prebuilds/linux-arm64/ffmpeg-LICENSE-LGPL-2.1.txt +502 -0
  129. package/node_modules/@appium/media-proxy/prebuilds/linux-arm64/ffmpeg-build-info.txt +3 -0
  130. package/node_modules/@appium/media-proxy/prebuilds/linux-arm64/libavcodec-appium.so.62 +0 -0
  131. package/node_modules/@appium/media-proxy/prebuilds/linux-arm64/libavutil-appium.so.60 +0 -0
  132. package/node_modules/@appium/media-proxy/prebuilds/linux-arm64/libswscale-appium.so.9 +0 -0
  133. package/node_modules/@appium/media-proxy/prebuilds/linux-x64/@appium+media-proxy.node +0 -0
  134. package/node_modules/@appium/media-proxy/prebuilds/linux-x64/ffmpeg-LICENSE-LGPL-2.1.txt +502 -0
  135. package/node_modules/@appium/media-proxy/prebuilds/linux-x64/ffmpeg-build-info.txt +3 -0
  136. package/node_modules/@appium/media-proxy/prebuilds/linux-x64/libavcodec-appium.so.62 +0 -0
  137. package/node_modules/@appium/media-proxy/prebuilds/linux-x64/libavutil-appium.so.60 +0 -0
  138. package/node_modules/@appium/media-proxy/prebuilds/linux-x64/libswscale-appium.so.9 +0 -0
  139. package/node_modules/@appium/media-proxy/prebuilds/win32-x64/@appium+media-proxy.node +0 -0
  140. package/node_modules/@appium/media-proxy/prebuilds/win32-x64/avcodec-appium-62.dll +0 -0
  141. package/node_modules/@appium/media-proxy/prebuilds/win32-x64/avutil-appium-60.dll +0 -0
  142. package/node_modules/@appium/media-proxy/prebuilds/win32-x64/ffmpeg-LICENSE-LGPL-2.1.txt +502 -0
  143. package/node_modules/@appium/media-proxy/prebuilds/win32-x64/ffmpeg-build-info.txt +3 -0
  144. package/node_modules/@appium/media-proxy/prebuilds/win32-x64/swscale-appium-9.dll +0 -0
  145. package/node_modules/@appium/media-proxy/scripts/install.mjs +29 -0
  146. package/node_modules/@appium/media-proxy/src/background.ts +15 -0
  147. package/node_modules/@appium/media-proxy/src/capabilities.ts +12 -0
  148. package/node_modules/@appium/media-proxy/src/errors.ts +45 -0
  149. package/node_modules/@appium/media-proxy/src/framing/apst.ts +158 -0
  150. package/node_modules/@appium/media-proxy/src/framing/mjpeg-http.ts +186 -0
  151. package/node_modules/@appium/media-proxy/src/framing/mjpeg-multipart.ts +38 -0
  152. package/node_modules/@appium/media-proxy/src/index.ts +43 -0
  153. package/node_modules/@appium/media-proxy/src/native/addon.cc +402 -0
  154. package/node_modules/@appium/media-proxy/src/native/audio_pipeline.cc +426 -0
  155. package/node_modules/@appium/media-proxy/src/native/audio_pipeline.h +63 -0
  156. package/node_modules/@appium/media-proxy/src/native/ffmpeg_util.h +37 -0
  157. package/node_modules/@appium/media-proxy/src/native/h264_encoder.cc +133 -0
  158. package/node_modules/@appium/media-proxy/src/native/h264_encoder.h +48 -0
  159. package/node_modules/@appium/media-proxy/src/native/mediafoundation_encoder.cc +442 -0
  160. package/node_modules/@appium/media-proxy/src/native/mediafoundation_encoder.h +14 -0
  161. package/node_modules/@appium/media-proxy/src/native/napi_util.h +20 -0
  162. package/node_modules/@appium/media-proxy/src/native/openh264_encoder.cc +285 -0
  163. package/node_modules/@appium/media-proxy/src/native/openh264_encoder.h +14 -0
  164. package/node_modules/@appium/media-proxy/src/native/pipeline.cc +555 -0
  165. package/node_modules/@appium/media-proxy/src/native/pipeline.h +108 -0
  166. package/node_modules/@appium/media-proxy/src/native/vendor/openh264/LICENSE +23 -0
  167. package/node_modules/@appium/media-proxy/src/native/vendor/openh264/codec_api.h +592 -0
  168. package/node_modules/@appium/media-proxy/src/native/vendor/openh264/codec_app_def.h +820 -0
  169. package/node_modules/@appium/media-proxy/src/native/vendor/openh264/codec_def.h +216 -0
  170. package/node_modules/@appium/media-proxy/src/native/vendor/openh264/codec_ver.h +15 -0
  171. package/node_modules/@appium/media-proxy/src/native/videotoolbox_encoder.cc +314 -0
  172. package/node_modules/@appium/media-proxy/src/native/videotoolbox_encoder.h +13 -0
  173. package/node_modules/@appium/media-proxy/src/native.ts +51 -0
  174. package/node_modules/@appium/media-proxy/src/pkg-root.ts +14 -0
  175. package/node_modules/@appium/media-proxy/src/queue.ts +133 -0
  176. package/node_modules/@appium/media-proxy/src/transcoder.ts +480 -0
  177. package/node_modules/@appium/media-proxy/src/types.ts +158 -0
  178. package/node_modules/appium-remote-debugger/CHANGELOG.md +7 -0
  179. package/node_modules/appium-remote-debugger/package.json +3 -3
  180. package/node_modules/bare-fs/package.json +2 -2
  181. package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
  182. package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
  183. package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
  184. package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
  185. package/node_modules/plist/dist/parse-binary.d.ts.map +1 -1
  186. package/node_modules/plist/dist/parse-binary.js +37 -9
  187. package/node_modules/plist/dist/parse-binary.js.map +1 -1
  188. package/node_modules/plist/package.json +1 -1
  189. package/package.json +6 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [13.3.0](https://github.com/appium/appium-xcuitest-driver/compare/v13.2.0...v13.3.0) (2026-11-20)
2
+
3
+ ### Features
4
+
5
+ * stream the screen and audio over the appium:mediaStream BiDi module ([#3149](https://github.com/appium/appium-xcuitest-driver/issues/3149)) ([899c90b](https://github.com/appium/appium-xcuitest-driver/commit/899c90bfaf2bff3faa81c72d01cedd0edb47d01e))
6
+
7
+ ## [13.2.0](https://github.com/appium/appium-xcuitest-driver/compare/v13.1.3...v13.2.0) (2026-11-19)
8
+
9
+ ### Features
10
+
11
+ * use base-driver's bundleId validation ([#3156](https://github.com/appium/appium-xcuitest-driver/issues/3156)) ([a1fcb2a](https://github.com/appium/appium-xcuitest-driver/commit/a1fcb2a29e82ccd5d65b44fccf6583a45b10d7d8))
12
+
1
13
  ## [13.1.3](https://github.com/appium/appium-xcuitest-driver/compare/v13.1.2...v13.1.3) (2026-11-18)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -0,0 +1,34 @@
1
+ import type { MediaKind, MediaStreamCapabilities, MediaStreamInfo, VideoCodec } from '../device/media-stream/types.js';
2
+ import type { XCUITestDriver } from '../driver.js';
3
+ declare module '../driver.js' {
4
+ interface XCUITestDriver {
5
+ mobileStartMediaStream(...args: Parameters<typeof mobileStartMediaStream>): ReturnType<typeof mobileStartMediaStream>;
6
+ mobileStopMediaStream(...args: Parameters<typeof mobileStopMediaStream>): ReturnType<typeof mobileStopMediaStream>;
7
+ mobileGetMediaStreamCapabilities(...args: Parameters<typeof mobileGetMediaStreamCapabilities>): ReturnType<typeof mobileGetMediaStreamCapabilities>;
8
+ }
9
+ }
10
+ /**
11
+ * Starts streaming the screen as `appium:mediaStream.*` BiDi events.
12
+ * Subscribe to `appium:mediaStream` before calling this.
13
+ * Simulators (Xcode 26+) encode the units themselves. Real devices (iOS/tvOS 27+, RemoteXPC tunnel) are
14
+ * captured as HEVC and transcoded to H.264 (with AAC audio) or MJPEG by `@appium/media-proxy`; HEVC is not available there yet.
15
+ *
16
+ * @param kind 'video' (H.264/HEVC, optionally with AAC audio) or 'jpeg'.
17
+ * @param codec Video codec, 'h264' by default.
18
+ * @param fps Maximum frames per second.
19
+ * @param bitrate Video bitrate in bits per second.
20
+ * @param quality JPEG quality, 0-100.
21
+ * @param scale JPEG scale in percent, 1-100.
22
+ * @param audio Whether to add an AAC audio track (video only).
23
+ * @param displayId The display to stream, the primary one by default.
24
+ * @param batchMs Units batching window for video/audio. 40 by default.
25
+ * @param idleHeartbeatMs Re-send the last JPEG after this idle time. 1000 by default, 0 disables.
26
+ */
27
+ export declare function mobileStartMediaStream(this: XCUITestDriver, kind: MediaKind, codec?: VideoCodec, fps?: number, bitrate?: number, quality?: number, scale?: number, audio?: boolean, displayId?: string, batchMs?: number, idleHeartbeatMs?: number): Promise<MediaStreamInfo>;
28
+ /** Stops a media stream started by `mobile: startMediaStream`. Stopping an ended stream is a no-op. */
29
+ export declare function mobileStopMediaStream(this: XCUITestDriver, streamId: string): Promise<void>;
30
+ /** Reports whether media streaming works for the current session, and which kinds/codecs it offers. */
31
+ export declare function mobileGetMediaStreamCapabilities(this: XCUITestDriver): Promise<MediaStreamCapabilities>;
32
+ /** Stops all streams of the session; used on session deletion. */
33
+ export declare function stopAllMediaStreams(this: XCUITestDriver): Promise<void>;
34
+ //# sourceMappingURL=media-stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-stream.d.ts","sourceRoot":"","sources":["../../../lib/commands/media-stream.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,SAAS,EAET,uBAAuB,EACvB,eAAe,EAEf,UAAU,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAIjD,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,cAAc;QACtB,sBAAsB,CACpB,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,GACjD,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;QAC7C,qBAAqB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;QACnH,gCAAgC,CAC9B,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,gCAAgC,CAAC,GAC3D,UAAU,CAAC,OAAO,gCAAgC,CAAC,CAAC;KACxD;CACF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,SAAS,EACf,KAAK,CAAC,EAAE,UAAU,EAClB,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,OAAO,EACf,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE,MAAyB,EAClC,eAAe,GAAE,MAAkC,GAClD,OAAO,CAAC,eAAe,CAAC,CAmF1B;AAED,uGAAuG;AACvG,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CASjG;AAED,uGAAuG;AACvG,wBAAsB,gCAAgC,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAE7G;AA6ED,kEAAkE;AAClE,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7E"}
@@ -0,0 +1,230 @@
1
+ import { errors } from 'appium/driver.js';
2
+ import { DEFAULT_BATCH_MS, DEFAULT_IDLE_HEARTBEAT_MS, MAX_BATCH_MS, MAX_BITRATE, MAX_DISPLAY_ID, MAX_FPS, MAX_IDLE_HEARTBEAT_MS, MEDIA_STREAM_MODULE, MEDIA_UNITS_EVENT, MIN_IDLE_HEARTBEAT_MS, MIN_SIMULATOR_XCODE_MAJOR, } from '../device/media-stream/constants.js';
3
+ import { DeviceMediaSource, isDeviceStreamingSupported } from '../device/media-stream/device-source.js';
4
+ import { describeMissingH264Encoder, loadMediaProxy } from '../device/media-stream/media-proxy.js';
5
+ import { SimulatorMediaSource } from '../device/media-stream/simulator-source.js';
6
+ import { MediaStream } from '../device/media-stream/stream.js';
7
+ import { supportsApiLevel27 } from '../utils/index.js';
8
+ import { BIDI_EVENT_NAME } from './bidi/constants.js';
9
+ /**
10
+ * Starts streaming the screen as `appium:mediaStream.*` BiDi events.
11
+ * Subscribe to `appium:mediaStream` before calling this.
12
+ * Simulators (Xcode 26+) encode the units themselves. Real devices (iOS/tvOS 27+, RemoteXPC tunnel) are
13
+ * captured as HEVC and transcoded to H.264 (with AAC audio) or MJPEG by `@appium/media-proxy`; HEVC is not available there yet.
14
+ *
15
+ * @param kind 'video' (H.264/HEVC, optionally with AAC audio) or 'jpeg'.
16
+ * @param codec Video codec, 'h264' by default.
17
+ * @param fps Maximum frames per second.
18
+ * @param bitrate Video bitrate in bits per second.
19
+ * @param quality JPEG quality, 0-100.
20
+ * @param scale JPEG scale in percent, 1-100.
21
+ * @param audio Whether to add an AAC audio track (video only).
22
+ * @param displayId The display to stream, the primary one by default.
23
+ * @param batchMs Units batching window for video/audio. 40 by default.
24
+ * @param idleHeartbeatMs Re-send the last JPEG after this idle time. 1000 by default, 0 disables.
25
+ */
26
+ export async function mobileStartMediaStream(kind, codec, fps, bitrate, quality, scale, audio, displayId, batchMs = DEFAULT_BATCH_MS, idleHeartbeatMs = DEFAULT_IDLE_HEARTBEAT_MS) {
27
+ const opts = {
28
+ kind,
29
+ codec,
30
+ fps,
31
+ bitrate,
32
+ quality,
33
+ scale,
34
+ audio,
35
+ displayId,
36
+ batchMs,
37
+ idleHeartbeatMs,
38
+ };
39
+ validateOpts(opts);
40
+ if (!this.isSimulator() &&
41
+ displayId !== undefined &&
42
+ !(/^\d{1,10}$/.test(displayId) && Number(displayId) <= MAX_DISPLAY_ID)) {
43
+ throw new errors.InvalidArgumentError(`'displayId' must be a numeric display id, got '${displayId}'`);
44
+ }
45
+ const caps = await getCapabilities(this);
46
+ if (!caps.supported) {
47
+ throw new errors.InvalidArgumentError(`Media streaming is not available: ${caps.reason?.message}`);
48
+ }
49
+ if (!caps.kinds.includes(kind)) {
50
+ throw new errors.InvalidArgumentError(`Kind '${kind}' is not available for ${caps.source} streaming${caps.reason ? `: ${caps.reason.message}` : ''}`);
51
+ }
52
+ if (kind === 'video' && !caps.codecs.includes(codec ?? 'h264')) {
53
+ throw new errors.InvalidArgumentError(`Codec '${codec ?? 'h264'}' is not available for ${caps.source} streaming, use one of: ${caps.codecs.join(', ')}`);
54
+ }
55
+ if (audio && !caps.audio) {
56
+ throw new errors.InvalidArgumentError(`Audio is not available for ${caps.source} streaming yet`);
57
+ }
58
+ const source = this.isSimulator()
59
+ ? new SimulatorMediaSource(this.device, opts)
60
+ : new DeviceMediaSource(this.remoteXPCFacade, opts, this.log);
61
+ const streams = (this._mediaStreams ??= new Map());
62
+ // Only streams that are still running stay here; ended ids move to `_endedMediaStreams`.
63
+ // Stopping a device capture stops everything streaming on the device, so streams must not overlap (a
64
+ // stream that is still tearing down is still registered)
65
+ if (!this.isSimulator() && streams.size > 0) {
66
+ throw new errors.InvalidArgumentError('A real device runs one media stream at a time, stop the running one first and retry');
67
+ }
68
+ if ([...streams.values()].some((s) => s.kind === kind && !s.isStopped)) {
69
+ throw new errors.InvalidArgumentError(`A ${kind} media stream is already running in this session`);
70
+ }
71
+ // No await between the check above and the registration below, or concurrent starts could both pass
72
+ let handedOut = false;
73
+ const stream = new MediaStream(source, opts, {
74
+ emit: (event) => {
75
+ if (hasSubscribers(this, event.method)) {
76
+ this.eventEmitter.emit(BIDI_EVENT_NAME, event);
77
+ }
78
+ },
79
+ emitter: this.eventEmitter,
80
+ hasSubscribers: () => hasSubscribers(this, MEDIA_UNITS_EVENT),
81
+ log: this.log,
82
+ onEnded: (id) => {
83
+ // Only ids the client received need to stay known for a late stop
84
+ if (this._mediaStreams?.delete(id) && handedOut) {
85
+ (this._endedMediaStreams ??= new Set()).add(id);
86
+ }
87
+ },
88
+ });
89
+ streams.set(stream.streamId, stream);
90
+ try {
91
+ const info = await stream.start();
92
+ handedOut = true;
93
+ return info;
94
+ }
95
+ catch (e) {
96
+ // Stay registered until the teardown is done: it stops the whole device, so nothing may start meanwhile
97
+ await stream.stop('failed to start');
98
+ throw e instanceof TypeError || e instanceof RangeError ? new errors.InvalidArgumentError(e.message) : e;
99
+ }
100
+ }
101
+ /** Stops a media stream started by `mobile: startMediaStream`. Stopping an ended stream is a no-op. */
102
+ export async function mobileStopMediaStream(streamId) {
103
+ const stream = this._mediaStreams?.get(streamId);
104
+ if (!stream) {
105
+ if (this._endedMediaStreams?.has(streamId)) {
106
+ return;
107
+ }
108
+ throw new errors.InvalidArgumentError(`Unknown media stream id '${streamId}'`);
109
+ }
110
+ await stream.stop();
111
+ }
112
+ /** Reports whether media streaming works for the current session, and which kinds/codecs it offers. */
113
+ export async function mobileGetMediaStreamCapabilities() {
114
+ return await getCapabilities(this);
115
+ }
116
+ async function getCapabilities(driver) {
117
+ if (!driver.isSimulator()) {
118
+ return await getDeviceCapabilities(driver);
119
+ }
120
+ const base = {
121
+ source: 'simulator',
122
+ kinds: ['video', 'jpeg'],
123
+ codecs: ['h264', 'hevc'],
124
+ audio: true,
125
+ };
126
+ const major = driver.xcodeVersion?.major;
127
+ if (major !== undefined && major < MIN_SIMULATOR_XCODE_MAJOR) {
128
+ return unsupported(base.source, {
129
+ code: 'xcode_too_old',
130
+ message: `Simulator media streaming requires Xcode ${MIN_SIMULATOR_XCODE_MAJOR}+, found ${major}`,
131
+ });
132
+ }
133
+ return { ...base, supported: true };
134
+ }
135
+ async function getDeviceCapabilities(driver) {
136
+ const source = 'device';
137
+ if (!supportsApiLevel27(driver.opts.platformVersion)) {
138
+ return unsupported(source, {
139
+ code: 'os_too_old',
140
+ message: `Real device media streaming requires iOS/tvOS 27+, found ${driver.opts.platformVersion}`,
141
+ });
142
+ }
143
+ if (!(await driver.remoteXPCFacade.isTunnelTier())) {
144
+ return unsupported(source, {
145
+ code: 'tunnel_required',
146
+ message: 'Real device media streaming requires a RemoteXPC tunnel',
147
+ });
148
+ }
149
+ try {
150
+ if (!(await isDeviceStreamingSupported(driver.remoteXPCFacade))) {
151
+ return unsupported(source, {
152
+ code: 'device_streaming_unsupported',
153
+ message: 'The device does not support media streaming (requires iOS/tvOS 27+)',
154
+ });
155
+ }
156
+ }
157
+ catch (e) {
158
+ return unsupported(source, {
159
+ code: 'device_unreachable',
160
+ message: `Cannot ask the device whether it supports media streaming: ${e.message}`,
161
+ });
162
+ }
163
+ let noH264;
164
+ try {
165
+ noH264 = describeMissingH264Encoder(await loadMediaProxy());
166
+ }
167
+ catch (e) {
168
+ return unsupported(source, { code: 'media_proxy_unavailable', message: e.message });
169
+ }
170
+ if (noH264) {
171
+ // Still usable as JPEG; the reason says what H.264 (and the audio that rides on it) needs
172
+ return {
173
+ supported: true,
174
+ source,
175
+ kinds: ['jpeg'],
176
+ codecs: [],
177
+ audio: false,
178
+ reason: { code: 'h264_encoder_unavailable', message: noH264 },
179
+ };
180
+ }
181
+ // media-proxy encodes H.264 only; the device's AAC-ELD audio is transcoded to AAC-LC
182
+ return { supported: true, source, kinds: ['video', 'jpeg'], codecs: ['h264'], audio: true };
183
+ }
184
+ function unsupported(source, reason) {
185
+ return { supported: false, reason, source, kinds: [], codecs: [], audio: false };
186
+ }
187
+ /** Stops all streams of the session; used on session deletion. */
188
+ export async function stopAllMediaStreams() {
189
+ await Promise.all([...(this._mediaStreams?.values() ?? [])].map((s) => s.stop('session ended')));
190
+ this._mediaStreams = undefined;
191
+ this._endedMediaStreams = undefined;
192
+ }
193
+ function hasSubscribers(driver, method) {
194
+ return [method, MEDIA_STREAM_MODULE].some((e) => (driver.bidiEventSubs[e]?.length ?? 0) > 0);
195
+ }
196
+ function validateOpts({ kind, codec, fps, bitrate, quality, scale, audio, batchMs, idleHeartbeatMs, }) {
197
+ if (kind !== 'video' && kind !== 'jpeg') {
198
+ throw new errors.InvalidArgumentError(`'kind' must be either 'video' or 'jpeg', got '${String(kind)}'`);
199
+ }
200
+ const wrongKind = kind === 'video' ? { quality, scale } : { codec, bitrate, audio };
201
+ const offending = Object.entries(wrongKind).filter(([, v]) => v !== undefined);
202
+ if (offending.length) {
203
+ throw new errors.InvalidArgumentError(`${offending.map(([k]) => `'${k}'`).join(', ')} not supported for kind '${kind}'`);
204
+ }
205
+ if (codec !== undefined && codec !== 'h264' && codec !== 'hevc') {
206
+ throw new errors.InvalidArgumentError(`'codec' must be either 'h264' or 'hevc', got '${String(codec)}'`);
207
+ }
208
+ if (audio !== undefined && typeof audio !== 'boolean') {
209
+ throw new errors.InvalidArgumentError(`'audio' must be a boolean, got '${String(audio)}'`);
210
+ }
211
+ const ranges = [
212
+ ['fps', fps, 1, MAX_FPS],
213
+ ['bitrate', bitrate, 1, MAX_BITRATE],
214
+ ['quality', quality, 0, 100],
215
+ ['scale', scale, 1, 100],
216
+ ];
217
+ for (const [name, value, min, max] of ranges) {
218
+ if (value !== undefined && !(Number.isFinite(value) && value >= min && value <= max)) {
219
+ throw new errors.InvalidArgumentError(`'${name}' must be a number ${max === Infinity ? `>= ${min}` : `between ${min} and ${max}`}, got '${String(value)}'`);
220
+ }
221
+ }
222
+ if (!Number.isInteger(batchMs) || batchMs < 0 || batchMs > MAX_BATCH_MS) {
223
+ throw new errors.InvalidArgumentError(`'batchMs' must be an integer between 0 and ${MAX_BATCH_MS}, got '${String(batchMs)}'`);
224
+ }
225
+ if (!Number.isInteger(idleHeartbeatMs) ||
226
+ (idleHeartbeatMs !== 0 && (idleHeartbeatMs < MIN_IDLE_HEARTBEAT_MS || idleHeartbeatMs > MAX_IDLE_HEARTBEAT_MS))) {
227
+ throw new errors.InvalidArgumentError(`'idleHeartbeatMs' must be 0 or an integer between ${MIN_IDLE_HEARTBEAT_MS} and ${MAX_IDLE_HEARTBEAT_MS}, got '${String(idleHeartbeatMs)}'`);
228
+ }
229
+ }
230
+ //# sourceMappingURL=media-stream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-stream.js","sourceRoot":"","sources":["../../../lib/commands/media-stream.ts"],"names":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AAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,WAAW,GAAG,QAAQ,GAAG,EAAE,UAAU,MAAM,CAAC,KAAK,CAAC,GAAG,CACrH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,YAAY,EAAE,CAAC;QACxE,MAAM,IAAI,MAAM,CAAC,oBAAoB,CACnC,8CAA8C,YAAY,UAAU,MAAM,CAAC,OAAO,CAAC,GAAG,CACvF,CAAC;IACJ,CAAC;IACD,IACE,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC;QAClC,CAAC,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,qBAAqB,IAAI,eAAe,GAAG,qBAAqB,CAAC,CAAC,EAC/G,CAAC;QACD,MAAM,IAAI,MAAM,CAAC,oBAAoB,CACnC,qDAAqD,qBAAqB,QAAQ,qBAAqB,UAAU,MAAM,CAAC,eAAe,CAAC,GAAG,CAC5I,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { MediaUnit } from './types.js';
2
+ /**
3
+ * Groups units into events that are homogeneous by track, batching each track on its own
4
+ * (a video keyframe always starts a new batch).
5
+ */
6
+ export declare class UnitBatcher {
7
+ private readonly batchMs;
8
+ private readonly onBatch;
9
+ private pending;
10
+ private timer?;
11
+ constructor(batchMs: number, onBatch: (units: MediaUnit[]) => void);
12
+ push(unit: MediaUnit): void;
13
+ flush(): void;
14
+ close(): void;
15
+ private flushTrack;
16
+ }
17
+ //# sourceMappingURL=batcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batcher.d.ts","sourceRoot":"","sources":["../../../../lib/device/media-stream/batcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,SAAS,EAAC,MAAM,YAAY,CAAC;AAEtD;;;GAGG;AACH,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAL1B,OAAO,CAAC,OAAO,CAAsC;IACrD,OAAO,CAAC,KAAK,CAAC,CAAiB;gBAGZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI;IAGxD,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IAc3B,KAAK,IAAI,IAAI;IAQb,KAAK,IAAI,IAAI;IAMb,OAAO,CAAC,UAAU;CAOnB"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Groups units into events that are homogeneous by track, batching each track on its own
3
+ * (a video keyframe always starts a new batch).
4
+ */
5
+ export class UnitBatcher {
6
+ batchMs;
7
+ onBatch;
8
+ pending = new Map();
9
+ timer;
10
+ constructor(batchMs, onBatch) {
11
+ this.batchMs = batchMs;
12
+ this.onBatch = onBatch;
13
+ }
14
+ push(unit) {
15
+ if (unit.track === 'video' && unit.key) {
16
+ this.flushTrack(unit.track);
17
+ }
18
+ const units = this.pending.get(unit.track) ?? [];
19
+ units.push(unit);
20
+ this.pending.set(unit.track, units);
21
+ if (this.batchMs <= 0 || unit.track === 'jpeg') {
22
+ this.flushTrack(unit.track);
23
+ }
24
+ else if (!this.timer) {
25
+ this.timer = setTimeout(() => this.flush(), this.batchMs);
26
+ }
27
+ }
28
+ flush() {
29
+ clearTimeout(this.timer);
30
+ this.timer = undefined;
31
+ for (const track of this.pending.keys()) {
32
+ this.flushTrack(track);
33
+ }
34
+ }
35
+ close() {
36
+ clearTimeout(this.timer);
37
+ this.timer = undefined;
38
+ this.pending.clear();
39
+ }
40
+ flushTrack(track) {
41
+ const units = this.pending.get(track);
42
+ if (units?.length) {
43
+ this.pending.delete(track);
44
+ this.onBatch(units);
45
+ }
46
+ }
47
+ }
48
+ //# sourceMappingURL=batcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batcher.js","sourceRoot":"","sources":["../../../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,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,KAAK;QACH,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAEO,UAAU,CAAC,KAAiB;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,KAAK,EAAE,MAAM,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ export declare const MEDIA_STREAM_MODULE = "appium:mediaStream";
2
+ export declare const MEDIA_UNITS_EVENT = "appium:mediaStream.units";
3
+ export declare const MEDIA_STARTED_EVENT = "appium:mediaStream.started";
4
+ export declare const MEDIA_FORMAT_CHANGED_EVENT = "appium:mediaStream.formatChanged";
5
+ export declare const MEDIA_ENDED_EVENT = "appium:mediaStream.ended";
6
+ export declare const BACKPRESSURE_EVENT_NAME = "bidiBackpressure";
7
+ export declare const KEYFRAME_REQUEST_MIN_INTERVAL_MS = 1000;
8
+ export declare const FIRST_UNIT_TIMEOUT_MS = 5000;
9
+ export declare const DEFAULT_BATCH_MS = 40;
10
+ export declare const DEFAULT_IDLE_HEARTBEAT_MS = 1000;
11
+ export declare const MIN_SIMULATOR_XCODE_MAJOR = 26;
12
+ export declare const MAX_FPS = 120;
13
+ export declare const MAX_BITRATE = 100000000;
14
+ export declare const MAX_BATCH_MS = 1000;
15
+ export declare const MIN_IDLE_HEARTBEAT_MS = 100;
16
+ export declare const MAX_IDLE_HEARTBEAT_MS = 60000;
17
+ export declare const MAX_DISPLAY_ID = 4294967295;
18
+ export declare const SOURCE_START_TIMEOUT_MS = 60000;
19
+ export declare const SOURCE_STOP_TIMEOUT_MS = 15000;
20
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../lib/device/media-stream/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,iBAAiB,6BAAiC,CAAC;AAChE,eAAO,MAAM,mBAAmB,+BAAmC,CAAC;AACpE,eAAO,MAAM,0BAA0B,qCAAyC,CAAC;AACjF,eAAO,MAAM,iBAAiB,6BAAiC,CAAC;AAChE,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAC1D,eAAO,MAAM,gCAAgC,OAAO,CAAC;AAErD,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,OAAO,MAAM,CAAC;AAC3B,eAAO,MAAM,WAAW,YAAc,CAAC;AACvC,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAC5C,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAC9C,eAAO,MAAM,sBAAsB,QAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ export const MEDIA_STREAM_MODULE = 'appium:mediaStream';
2
+ export const MEDIA_UNITS_EVENT = `${MEDIA_STREAM_MODULE}.units`;
3
+ export const MEDIA_STARTED_EVENT = `${MEDIA_STREAM_MODULE}.started`;
4
+ export const MEDIA_FORMAT_CHANGED_EVENT = `${MEDIA_STREAM_MODULE}.formatChanged`;
5
+ export const MEDIA_ENDED_EVENT = `${MEDIA_STREAM_MODULE}.ended`;
6
+ export const BACKPRESSURE_EVENT_NAME = 'bidiBackpressure';
7
+ export const KEYFRAME_REQUEST_MIN_INTERVAL_MS = 1000;
8
+ // The encoder reports its first unit right after it starts, regardless of screen activity
9
+ export const FIRST_UNIT_TIMEOUT_MS = 5000;
10
+ export const DEFAULT_BATCH_MS = 40;
11
+ export const DEFAULT_IDLE_HEARTBEAT_MS = 1000;
12
+ export const MIN_SIMULATOR_XCODE_MAJOR = 26;
13
+ // Upper bounds for client-supplied options, so one request cannot overload the server
14
+ export const MAX_FPS = 120;
15
+ export const MAX_BITRATE = 100_000_000;
16
+ export const MAX_BATCH_MS = 1000;
17
+ export const MIN_IDLE_HEARTBEAT_MS = 100;
18
+ export const MAX_IDLE_HEARTBEAT_MS = 60_000;
19
+ export const MAX_DISPLAY_ID = 0xffffffff;
20
+ // Bounds the wait on the device/simulator, so a hung source cannot block the session teardown
21
+ export const SOURCE_START_TIMEOUT_MS = 60_000;
22
+ export const SOURCE_STOP_TIMEOUT_MS = 15_000;
23
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../lib/device/media-stream/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,mBAAmB,QAAQ,CAAC;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,mBAAmB,UAAU,CAAC;AACpE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,mBAAmB,gBAAgB,CAAC;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,mBAAmB,QAAQ,CAAC;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAC1D,MAAM,CAAC,MAAM,gCAAgC,GAAG,IAAI,CAAC;AACrD,0FAA0F;AAC1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAC1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAC5C,sFAAsF;AACtF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AACjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AACzC,8FAA8F;AAC9F,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { AppiumLogger } from '@appium/types';
2
+ import type { RemoteXPCFacade } from '../remote-xpc/facade.js';
3
+ import type { MediaSource, SourceUnit, StartMediaStreamOpts } from './types.js';
4
+ /** Asks the device whether it can stream its screen; opens and closes a display service for that */
5
+ export declare function isDeviceStreamingSupported(facade: RemoteXPCFacade): Promise<boolean>;
6
+ /**
7
+ * Real device (iOS/tvOS 27+): remotexpc captures the HEVC screen stream over the tunnel and
8
+ * media-proxy transcodes it to H.264 or MJPEG.
9
+ */
10
+ export declare class DeviceMediaSource implements MediaSource {
11
+ private readonly facade;
12
+ private readonly opts;
13
+ private readonly log;
14
+ private display?;
15
+ private capture?;
16
+ private audioCapture?;
17
+ private audioFeeder?;
18
+ private transcoder?;
19
+ private feeder?;
20
+ private orientationTimer?;
21
+ private infoService?;
22
+ private rotation;
23
+ private polling;
24
+ private failure?;
25
+ private starting?;
26
+ private stopping?;
27
+ constructor(facade: RemoteXPCFacade, opts: StartMediaStreamOpts, log: AppiumLogger);
28
+ start(): Promise<void>;
29
+ private open;
30
+ private readGeometry;
31
+ private pollOrientation;
32
+ units(): AsyncGenerator<SourceUnit>;
33
+ requestKeyFrame(): Promise<boolean>;
34
+ stop(): Promise<void>;
35
+ private teardown;
36
+ private feed;
37
+ private feedAudio;
38
+ }
39
+ //# sourceMappingURL=device-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-source.d.ts","sourceRoot":"","sources":["../../../../lib/device/media-stream/device-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAI7D,OAAO,KAAK,EAAC,WAAW,EAAE,UAAU,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAC;AA6B9E,oGAAoG;AACpG,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAS1F;AAED;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,WAAW;IAgBjD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAjBtB,OAAO,CAAC,OAAO,CAAC,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAC,CAAU;IAC1B,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,WAAW,CAAC,CAAgB;IACpC,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,MAAM,CAAC,CAAgB;IAC/B,OAAO,CAAC,gBAAgB,CAAC,CAAiB;IAC1C,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAC,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAC,CAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,CAAgB;gBAGd,MAAM,EAAE,eAAe,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