Skip to content

Commit

Permalink
Refactor VolumeResult interface in types.ts to consolidate Android vo…
Browse files Browse the repository at this point in the history
…lume properties

- Removed individual volume properties (alarm, call, music, notification, ring, system) from VolumeResult interface.
- Introduced a new property 'type' of type AndroidVolumeTypes to represent the volume type for Android devices.
- Streamlined the interface for better clarity and maintainability.
  • Loading branch information
hirbod committed Dec 15, 2024
1 parent f7f6144 commit bda2439
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,13 @@ export interface VolumeManagerSetVolumeConfig {
* @export
* @interface VolumeResult
* @property {number} volume - The volume level. Both for iOS and Android. Defaults to music.
* @property {number} alarm - The alarm volume. Android only.
* @property {number} call - The call volume. Android only.
* @property {number} music - The music volume. Android only.
* @property {number} notification - The notification volume. Android only.
* @property {number} ring - The ring volume. Android only.
* @property {number} system - The system volume. Android only.
* @property {AndroidVolumeTypes} type - The type of volume. Android only.
*/
export interface VolumeResult {
// Both iOS and Android (defaults to type music for android)
volume: number;
// Android only
alarm?: number;
// Android only
call?: number;
// Android only
music?: number;
// Android only
notification?: number;
// Android only
ring?: number;
// Android only
system?: number;
type?: AndroidVolumeTypes;
}

// Accepted Ringer Mode values
Expand Down

0 comments on commit bda2439

Please sign in to comment.