mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 01:39:21 +02:00
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import type { Adb } from "@yume-chan/adb";
|
|
import type { ScrcpyDisplay, ScrcpyEncoder } from "@yume-chan/scrcpy";
|
|
import { ScrcpyOptions2_2 } from "@yume-chan/scrcpy";
|
|
|
|
import {
|
|
createConnection,
|
|
getDisplays,
|
|
getEncoders,
|
|
} from "./2_1/impl/index.js";
|
|
import type { AdbScrcpyConnection } from "./connection.js";
|
|
import { AdbScrcpyOptions } from "./types.js";
|
|
|
|
export class AdbScrcpyOptions2_2<
|
|
TVideo extends boolean,
|
|
> extends AdbScrcpyOptions<ScrcpyOptions2_2.Init<TVideo>> {
|
|
constructor(init: ScrcpyOptions2_2.Init<TVideo>, version?: string) {
|
|
super(new ScrcpyOptions2_2(init, version));
|
|
}
|
|
|
|
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 AdbScrcpyOptions2_2 {
|
|
export type Init<TVideo extends boolean = boolean> =
|
|
ScrcpyOptions2_2.Init<TVideo>;
|
|
}
|