@yume-chan/scrcpy
Version:
TypeScript implementation of Scrcpy client.
80 lines • 3.97 kB
TypeScript
import type { MaybePromiseLike } from "@yume-chan/async";
import type { ReadableStream, TransformStream } from "@yume-chan/stream-extra";
import type { AsyncExactReadable, ExactReadable } from "@yume-chan/struct";
import type { ScrcpyAudioStreamMetadata, ScrcpyControlMessageType, ScrcpyDisplay, ScrcpyEncoder, ScrcpyMediaStreamPacket, ScrcpyOptions, ScrcpyOptionsListEncoders, ScrcpyScrollController, ScrcpyVideoStream } from "../base/index.js";
import type { ScrcpyBackOrScreenOnControlMessage, ScrcpyInjectTouchControlMessage, ScrcpySetClipboardControlMessage } from "../latest.js";
import type { Init } from "./impl/index.js";
export declare class ScrcpyOptions2_2<TVideo extends boolean> implements ScrcpyOptions<Init<TVideo>>, ScrcpyOptionsListEncoders {
#private;
static readonly Defaults: {
readonly videoSource: "display";
readonly displayId: 0;
readonly cameraId: undefined;
readonly cameraSize: undefined;
readonly cameraFacing: undefined;
readonly cameraAr: undefined;
readonly cameraFps: undefined;
readonly cameraHighSpeed: false;
readonly listCameras: false;
readonly listCameraSizes: false;
readonly video: true;
readonly audioSource: "output";
readonly scid: undefined;
readonly videoCodec: "h264";
readonly videoBitRate: 8000000;
readonly videoCodecOptions: undefined;
readonly videoEncoder: undefined;
readonly audio: true;
readonly audioCodec: "opus";
readonly audioBitRate: 128000;
readonly audioCodecOptions: undefined;
readonly audioEncoder: undefined;
readonly listEncoders: false;
readonly listDisplays: false;
readonly sendCodecMeta: true;
readonly powerOn: true;
readonly cleanup: true;
readonly downsizeOnError: true;
readonly sendDeviceMeta: true;
readonly sendDummyByte: true;
readonly clipboardAutosync: true;
readonly logLevel: "debug";
readonly lockVideoOrientation: -1;
readonly powerOffOnClose: false;
readonly encoderName: undefined;
readonly maxSize: 0;
readonly bitRate: 8000000;
readonly maxFps: 0;
readonly tunnelForward: false;
readonly crop: undefined;
readonly sendFrameMeta: true;
readonly control: true;
readonly showTouches: false;
readonly stayAwake: false;
readonly codecOptions: undefined;
};
readonly value: Required<Init<TVideo>>;
get controlMessageTypes(): readonly ScrcpyControlMessageType[];
get clipboard(): ReadableStream<string> | undefined;
constructor(init: Init<TVideo>);
serialize(): string[];
setListDisplays(): void;
parseDisplay(line: string): ScrcpyDisplay | undefined;
setListEncoders(): void;
parseEncoder(line: string): ScrcpyEncoder | undefined;
parseVideoStreamMetadata(stream: ReadableStream<Uint8Array>): MaybePromiseLike<ScrcpyVideoStream>;
parseAudioStreamMetadata(stream: ReadableStream<Uint8Array>): MaybePromiseLike<ScrcpyAudioStreamMetadata>;
parseDeviceMessage(id: number, stream: ExactReadable | AsyncExactReadable): Promise<void>;
endDeviceMessageStream(e?: unknown): void;
createMediaStreamTransformer(): TransformStream<Uint8Array, ScrcpyMediaStreamPacket>;
serializeInjectTouchControlMessage(message: ScrcpyInjectTouchControlMessage): Uint8Array;
serializeBackOrScreenOnControlMessage(message: ScrcpyBackOrScreenOnControlMessage): Uint8Array | undefined;
serializeSetClipboardControlMessage(message: ScrcpySetClipboardControlMessage): Uint8Array | [Uint8Array, Promise<void>];
createScrollController(): ScrcpyScrollController;
}
type Init_<TVideo extends boolean> = Init<TVideo>;
export declare namespace ScrcpyOptions2_2 {
type Init<TVideo extends boolean = boolean> = Init_<TVideo>;
}
export {};
//# sourceMappingURL=options.d.ts.map