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.
- package/dist/AssistsXAsync.d.ts +8 -2
- package/dist/AssistsXAsync.js +3 -3
- package/package.json +1 -1
- package/src/AssistsXAsync.ts +15 -6
package/dist/AssistsXAsync.d.ts
CHANGED
|
@@ -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
|
|
385
|
-
|
|
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
|
}
|
package/dist/AssistsXAsync.js
CHANGED
|
@@ -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
package/src/AssistsXAsync.ts
CHANGED
|
@@ -927,18 +927,27 @@ export class AssistsXAsync {
|
|
|
927
927
|
}
|
|
928
928
|
public static async audioPlayFromFile(
|
|
929
929
|
filePath: string,
|
|
930
|
-
|
|
931
|
-
|
|
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
|
|
941
|
-
|
|
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
|
});
|