@yume-chan/scrcpy
Version:
TypeScript implementation of Scrcpy client.
92 lines • 2.94 kB
TypeScript
import type { ScrcpyOptionValue } from "../../base/index.js";
export declare const VideoOrientation: {
readonly Unlocked: -1;
readonly Portrait: 0;
readonly Landscape: 1;
readonly PortraitFlipped: 2;
readonly LandscapeFlipped: 3;
};
export type VideoOrientation = (typeof VideoOrientation)[keyof typeof VideoOrientation];
export type LogLevel = "debug" | "info" | "warn" | "error";
/**
* If the option you need is not in this type,
* please file an issue on GitHub.
*/
export interface CodecOptionsInit {
profile?: number | undefined;
level?: number | undefined;
iFrameInterval?: number | undefined;
maxBframes?: number | undefined;
repeatPreviousFrameAfter?: number | undefined;
maxPtsGapToEncoder?: number | undefined;
intraRefreshPeriod?: number | undefined;
}
export declare class CodecOptions implements ScrcpyOptionValue {
static Empty: CodecOptions;
options: CodecOptionsInit;
constructor(options?: CodecOptionsInit);
toOptionValue(): string | undefined;
}
export declare namespace CodecOptions {
type Init = CodecOptionsInit;
}
export declare class Crop implements ScrcpyOptionValue {
width: number;
height: number;
x: number;
y: number;
constructor(width: number, height: number, x: number, y: number);
toOptionValue(): string | undefined;
}
export interface Init {
logLevel?: LogLevel;
/**
* The maximum value of both width and height.
*/
maxSize?: number;
bitRate?: number;
/**
* 0 for unlimited.
*
* @default 0
*/
maxFps?: number;
/**
* The orientation of the video stream.
*
* It will not keep the device screen in specific orientation,
* only the captured video will in this orientation.
*/
lockVideoOrientation?: VideoOrientation;
/**
* Use ADB forward tunnel instead of reverse tunnel.
*
* This option is mainly used for working around the bug that on Android <9,
* ADB daemon can't create reverse tunnels if connected wirelessly (ADB over WiFi).
*
* When using `AdbScrcpyClient`, it can detect this situation and enable this option automatically.
*/
tunnelForward?: boolean;
crop?: Crop | string | undefined;
/**
* Send PTS so that the client may record properly
*
* Note: When `sendFrameMeta: false` is specified,
* the video stream will not contain `configuration` typed packets,
* which means it can't be decoded by the companion decoders.
* It's still possible to record the stream into a file,
* or to decode it with a more tolerant decoder like FFMpeg.
*
* @default true
*/
sendFrameMeta?: boolean;
/**
* @default true
*/
control?: boolean;
displayId?: number;
showTouches?: boolean;
stayAwake?: boolean;
codecOptions?: CodecOptions | string | undefined;
}
//# sourceMappingURL=init.d.ts.map