mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 19:42:15 +02:00
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import type { Adb } from "@yume-chan/adb";
|
|
import type { ScrcpyDisplay, ScrcpyEncoder } from "@yume-chan/scrcpy";
|
|
import { ScrcpyOptions1_22 } from "@yume-chan/scrcpy";
|
|
|
|
import {
|
|
createConnection,
|
|
getDisplays,
|
|
getEncoders,
|
|
} from "../1_15/impl/index.js";
|
|
import type { AdbScrcpyClientOptions } from "../client-options.js";
|
|
import type { AdbScrcpyConnection } from "../connection.js";
|
|
import { AdbScrcpyOptions } from "../types.js";
|
|
|
|
export class AdbScrcpyOptions1_22 extends AdbScrcpyOptions<ScrcpyOptions1_22.Init> {
|
|
constructor(
|
|
init: ScrcpyOptions1_22.Init,
|
|
clientOptions?: AdbScrcpyClientOptions,
|
|
) {
|
|
super(
|
|
new ScrcpyOptions1_22(init, clientOptions?.version),
|
|
clientOptions?.spawner,
|
|
);
|
|
}
|
|
|
|
override getEncoders(adb: Adb, path: string): Promise<ScrcpyEncoder[]> {
|
|
return getEncoders(adb, path, this);
|
|
}
|
|
|
|
override getDisplays(adb: Adb, path: string): Promise<ScrcpyDisplay[]> {
|
|
return getDisplays(adb, path, this);
|
|
}
|
|
|
|
override createConnection(adb: Adb): AdbScrcpyConnection {
|
|
return createConnection(adb, this.value);
|
|
}
|
|
}
|
|
|
|
export namespace AdbScrcpyOptions1_22 {
|
|
export type Init = ScrcpyOptions1_22.Init;
|
|
}
|