mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 09:49:24 +02:00
feat(adb-scrcpy): add aliases for all AdbScrcpyOptions versions
This commit is contained in:
parent
7ad568d1b5
commit
02f5bd5929
80 changed files with 1181 additions and 331 deletions
33
libraries/adb-scrcpy/src/2_2.ts
Normal file
33
libraries/adb-scrcpy/src/2_2.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
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 extends AdbScrcpyOptions<ScrcpyOptions2_2.Init> {
|
||||
constructor(init: ScrcpyOptions2_2.Init, 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 = ScrcpyOptions2_2.Init;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue