starti.app 2.0.62 → 2.0.65
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.
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { EventTargetWithType } from "../../EventTarget";
|
|
2
|
+
import { Startiapp } from "../../startiapp";
|
|
3
|
+
import { VolumeChangedEventArgs } from "./VolumeChangedEventArgs";
|
|
4
|
+
export declare class Media extends EventTargetWithType<{
|
|
5
|
+
volumeChanged: CustomEvent<VolumeChangedEventArgs>;
|
|
6
|
+
}> {
|
|
7
|
+
private readonly startiapp;
|
|
8
|
+
private integration;
|
|
9
|
+
constructor(startiapp: Startiapp);
|
|
10
|
+
/**
|
|
11
|
+
* Sets the system volume to the specified value
|
|
12
|
+
*
|
|
13
|
+
* @param newVolume - The new volume value (between 0 and 1)
|
|
14
|
+
* @returns A promise that resolves when the volume has been set
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* await startiapp.Media.setVolume(0.5);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
setVolume(newVolume: number): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the current system volume
|
|
23
|
+
*
|
|
24
|
+
* @returns A promise that resolves with the current volume value between 0 and 1
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const volume = await startiapp.Media.getVolume();
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
getVolume(): Promise<number>;
|
|
31
|
+
/**
|
|
32
|
+
* Increases the system volume by one step
|
|
33
|
+
*
|
|
34
|
+
* @returns A promise that resolves when the volume has been increased
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* await startiapp.Media.increaseVolume();
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
increaseVolume(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Decreases the system volume by one step
|
|
43
|
+
*
|
|
44
|
+
* @returns A promise that resolves when the volume has been decreased
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* await startiapp.Media.decreaseVolume();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
decreaseVolume(): Promise<void>;
|
|
51
|
+
protected onVolumeChanged(args: VolumeChangedEventArgs): void;
|
|
52
|
+
}
|
package/dist/integrations.d.ts
CHANGED
|
@@ -124,6 +124,12 @@ type LocationIntegration = {
|
|
|
124
124
|
requestAccess(): PermissionStatus;
|
|
125
125
|
checkAccess(): PermissionStatus;
|
|
126
126
|
};
|
|
127
|
+
type MediaIntegration = {
|
|
128
|
+
setVolume(newVolume: number): void;
|
|
129
|
+
getVolume(): number;
|
|
130
|
+
increaseVolume(): void;
|
|
131
|
+
decreaseVolume(): void;
|
|
132
|
+
};
|
|
127
133
|
export type Integrations = {
|
|
128
134
|
AppIntegration: AppIntegration;
|
|
129
135
|
DeviceIntegration: DeviceIntegration;
|
|
@@ -139,5 +145,6 @@ export type Integrations = {
|
|
|
139
145
|
DeveloperIntegration: DeveloperIntegration;
|
|
140
146
|
StorageIntegration: StorageIntegration;
|
|
141
147
|
LocationIntegration: LocationIntegration;
|
|
148
|
+
MediaIntegration: MediaIntegration;
|
|
142
149
|
};
|
|
143
150
|
export {};
|
package/dist/startiapp.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Biometrics } from "./integrations/Biometrics/BiometricsIntegration";
|
|
|
3
3
|
import { Developer } from "./integrations/Developer/DeveloperIntegration";
|
|
4
4
|
import { InAppPurchase } from "./integrations/InAppPurchase/InAppPurchaseIntegration";
|
|
5
5
|
import { Location } from "./integrations/Location/LocationIntegration";
|
|
6
|
+
import { Media } from "./integrations/Media/MediaIntegration";
|
|
6
7
|
import { Network } from "./integrations/Network/NetworkIntegration";
|
|
7
8
|
import { NfcScanner } from "./integrations/NfcScanner/NfcScannerIntegration";
|
|
8
9
|
import { PushNotification } from "./integrations/PushNotification/PushNotificationIntegration";
|
|
@@ -35,6 +36,7 @@ export declare class StartiappClass extends EventTarget {
|
|
|
35
36
|
Iap: InAppPurchase;
|
|
36
37
|
Trigger: Trigger;
|
|
37
38
|
User: User;
|
|
39
|
+
Media: Media;
|
|
38
40
|
constructor();
|
|
39
41
|
/**
|
|
40
42
|
* Initializes the app.
|
package/package.json
CHANGED