assistsx-js 0.0.2034 → 0.0.2036

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -381,6 +381,12 @@ export declare class AssistsXAsync {
381
381
  */
382
382
  static openUrlInBrowser(url: string, timeout?: number): Promise<boolean>;
383
383
  static download(url: string, timeout?: number): Promise<string | null | undefined>;
384
- static audioPlayFromFile(filePath: string, volume?: number | undefined, timeout?: number): Promise<string | null | undefined>;
385
- static audioStop(timeout?: number): Promise<boolean | null | undefined>;
384
+ static audioPlayFromFile(filePath: string, { volume, useAbsoluteVolume, timeout, }: {
385
+ volume?: number;
386
+ useAbsoluteVolume?: boolean;
387
+ timeout?: number;
388
+ }): Promise<string | null | undefined>;
389
+ static audioStop({ timeout, }: {
390
+ timeout?: number;
391
+ }): Promise<boolean | null | undefined>;
386
392
  }
@@ -645,14 +645,14 @@ export class AssistsXAsync {
645
645
  });
646
646
  return response.getDataOrDefault(null);
647
647
  }
648
- static async audioPlayFromFile(filePath, volume = undefined, timeout) {
648
+ static async audioPlayFromFile(filePath, { volume = undefined, useAbsoluteVolume = false, timeout = 30, }) {
649
649
  const response = await this.asyncCall(CallMethod.audioPlayFromFile, {
650
- args: { filePath },
650
+ args: { filePath, volume, useAbsoluteVolume },
651
651
  timeout,
652
652
  });
653
653
  return response.getDataOrDefault(null);
654
654
  }
655
- static async audioStop(timeout) {
655
+ static async audioStop({ timeout = 30, }) {
656
656
  const response = await this.asyncCall(CallMethod.audioStop, {
657
657
  timeout,
658
658
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.0.2034",
3
+ "version": "0.0.2036",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -927,18 +927,27 @@ export class AssistsXAsync {
927
927
  }
928
928
  public static async audioPlayFromFile(
929
929
  filePath: string,
930
- volume: number | undefined = undefined,
931
- timeout?: number
930
+ {
931
+ volume = undefined,
932
+ useAbsoluteVolume = false,
933
+ timeout = 30,
934
+ }: {
935
+ volume?: number;
936
+ useAbsoluteVolume?: boolean;
937
+ timeout?: number;
938
+ }
932
939
  ): Promise<string | null | undefined> {
933
940
  const response = await this.asyncCall(CallMethod.audioPlayFromFile, {
934
- args: { filePath },
941
+ args: { filePath, volume, useAbsoluteVolume },
935
942
  timeout,
936
943
  });
937
944
  return response.getDataOrDefault(null);
938
945
  }
939
- public static async audioStop(
940
- timeout?: number
941
- ): Promise<boolean | null | undefined> {
946
+ public static async audioStop({
947
+ timeout = 30,
948
+ }: {
949
+ timeout?: number;
950
+ }): Promise<boolean | null | undefined> {
942
951
  const response = await this.asyncCall(CallMethod.audioStop, {
943
952
  timeout,
944
953
  });