mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 09:49:24 +02:00
33 lines
1 KiB
TypeScript
33 lines
1 KiB
TypeScript
import type { Adb } from "@yume-chan/adb";
|
|
import type { ScrcpyDisplay, ScrcpyEncoder } from "@yume-chan/scrcpy";
|
|
import { ScrcpyOptions1_20 } from "@yume-chan/scrcpy";
|
|
|
|
import {
|
|
createConnection,
|
|
getDisplays,
|
|
getEncoders,
|
|
} from "./1_15/impl/index.js";
|
|
import type { AdbScrcpyConnection } from "./connection.js";
|
|
import { AdbScrcpyOptions } from "./types.js";
|
|
|
|
export class AdbScrcpyOptions1_20 extends AdbScrcpyOptions<ScrcpyOptions1_20.Init> {
|
|
constructor(init: ScrcpyOptions1_20.Init, version?: string) {
|
|
super(new ScrcpyOptions1_20(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 AdbScrcpyOptions1_20 {
|
|
export type Init = ScrcpyOptions1_20.Init;
|
|
}
|