UNPKG

appium-android-driver

Version:

Android UiAutomator and Chrome support for Appium

54 lines 3.05 kB
import type { AndroidDriver } from '../driver'; /** * Starts a screen streaming session that broadcasts the device screen as an MJPEG stream. * * This method uses Android's `screenrecord` command to capture the screen and GStreamer * to encode it as an MJPEG stream accessible via HTTP. The stream can be viewed in any * web browser or MJPEG-compatible client. * * Requirements: * - The device must have the `screenrecord` binary available * - The host system must have GStreamer installed with required plugins * - The ADB screen streaming feature must be enabled * * @param width The scaled width of the device's screen. * If unset then the script will assign it to the actual screen width measured * in pixels. * @param height The scaled height of the device's screen. * If unset then the script will assign it to the actual screen height * measured in pixels. * @param bitRate The video bit rate for the video, in bits per second. * The default value is 4 Mb/s. You can increase the bit rate to improve video * quality, but doing so results in larger movie files. * @param host The IP address/host name to start the MJPEG server on. * You can set it to `0.0.0.0` to trigger the broadcast on all available * network interfaces. * @param port The port number to start the MJPEG server on. * @param tcpPort The port number to start the internal TCP MJPEG broadcast on. * @param pathname The HTTP request path the MJPEG server should be available on. * If unset, then any pathname on the given `host`/`port` combination will * work. Note that the value should always start with a single slash: `/` * @param quality The quality value for the streamed JPEG images. * This number should be in range `[1,100]`, where `100` is the best quality. * @param considerRotation If set to `true` then GStreamer pipeline will increase the dimensions of * the resulting images to properly fit images in both landscape and portrait * orientations. * Set it to `true` if the device rotation is not going to be the same during * the broadcasting session. * @param logPipelineDetails Whether to log GStreamer pipeline events into the standard log output. * Might be useful for debugging purposes. * @throws {Error} If streaming requirements are not met, ports are busy, or streaming fails to start. */ export declare function mobileStartScreenStreaming(this: AndroidDriver, width?: number, height?: number, bitRate?: number, host?: string, port?: number, pathname?: string, tcpPort?: number, quality?: number, considerRotation?: boolean, logPipelineDetails?: boolean): Promise<void>; /** * Stops the currently running screen streaming session. * * This method gracefully terminates all processes involved in screen streaming: * - The MJPEG HTTP server * - The GStreamer pipeline * - The device screen recording process * * If no streaming session is active, this method returns without error. */ export declare function mobileStopScreenStreaming(this: AndroidDriver): Promise<void>; //# sourceMappingURL=streamscreen.d.ts.map