fix(scrcpy): remove extra version parameters

This commit is contained in:
Simon Chan 2024-12-24 03:54:35 +08:00
parent 8c5b3c2632
commit aeaa9020dc
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
4 changed files with 8 additions and 19 deletions

View file

@ -217,28 +217,26 @@ export class AdbScrcpyClient {
* This method will modify the given `options`, * This method will modify the given `options`,
* so don't reuse it elsewhere. * so don't reuse it elsewhere.
*/ */
static async getEncoders( static getEncoders(
adb: Adb, adb: Adb,
path: string, path: string,
version: string,
options: AdbScrcpyOptions<object>, options: AdbScrcpyOptions<object>,
): Promise<ScrcpyEncoder[]> { ): Promise<ScrcpyEncoder[]> {
options.setListEncoders(); options.setListEncoders();
return await options.getEncoders(adb, path, version); return options.getEncoders(adb, path);
} }
/** /**
* This method will modify the given `options`, * This method will modify the given `options`,
* so don't reuse it elsewhere. * so don't reuse it elsewhere.
*/ */
static async getDisplays( static getDisplays(
adb: Adb, adb: Adb,
path: string, path: string,
version: string,
options: AdbScrcpyOptions<object>, options: AdbScrcpyOptions<object>,
): Promise<ScrcpyDisplay[]> { ): Promise<ScrcpyDisplay[]> {
options.setListDisplays(); options.setListDisplays();
return await options.getDisplays(adb, path, version); return options.getDisplays(adb, path);
} }
#options: AdbScrcpyOptions<object>; #options: AdbScrcpyOptions<object>;

View file

@ -1,3 +1 @@
import { AdbScrcpyOptions2_1 } from "./2_1.js"; export { AdbScrcpyOptions2_1 as AdbScrcpyOptionsLatest } from "./2_1.js";
export class AdbScrcpyOptionsLatest extends AdbScrcpyOptions2_1 {}

View file

@ -7,17 +7,9 @@ import type { AdbScrcpyConnection } from "../connection.js";
export abstract class AdbScrcpyOptions< export abstract class AdbScrcpyOptions<
T extends object, T extends object,
> extends ScrcpyOptionsWrapper<T> { > extends ScrcpyOptionsWrapper<T> {
abstract getEncoders( abstract getEncoders(adb: Adb, path: string): Promise<ScrcpyEncoder[]>;
adb: Adb,
path: string,
version: string,
): Promise<ScrcpyEncoder[]>;
abstract getDisplays( abstract getDisplays(adb: Adb, path: string): Promise<ScrcpyDisplay[]>;
adb: Adb,
path: string,
version: string,
): Promise<ScrcpyDisplay[]>;
abstract createConnection(adb: Adb): AdbScrcpyConnection; abstract createConnection(adb: Adb): AdbScrcpyConnection;
} }

View file

@ -24,6 +24,7 @@ export * from "./2_7/index.js";
export * from "./3_0/index.js"; export * from "./3_0/index.js";
export * from "./3_0_1.js"; export * from "./3_0_1.js";
export * from "./3_0_2.js"; export * from "./3_0_2.js";
export * from "./3_1/index.js";
export * from "./android/index.js"; export * from "./android/index.js";
export * from "./base/index.js"; export * from "./base/index.js";
export * from "./codec/index.js"; export * from "./codec/index.js";