0.0.1 • Published 12 months ago
@ottimis/capacitor-volumes v0.0.1
@ottimis/capacitor-volumes
Manage device volume from capacitor.
Get volume level in a range between 1 and 10. Volume will be set proportionally in a scale between 0 and "maxVolumeOfDevice".
⭐️ Any suggestion will be appreciated
Supported platforms
Platform | Supported | |
---|---|---|
Android | ✅ | |
iOS | ✅ | (only getVolumeLevel) |
Web | ❌ |
Install
npm install @ottimis/capacitor-volumes
npx cap sync
API
getVolumeLevel(...)
getVolumeLevel(options?: { type?: VolumeTypes | undefined; } | undefined) => Promise<{ value: number; }>
type parameter is only available on Android
Param | Type |
---|---|
options | { type?: VolumeTypes; } |
Returns: Promise<{ value: number; }>
setVolumeLevel(...)
setVolumeLevel(options: { value: number; type?: VolumeTypes; }) => Promise<{ value: number; }>
this works only on Android value parameter is an integer between 0 and 10 for android
Param | Type |
---|---|
options | { value: number; type?: VolumeTypes; } |
Returns: Promise<{ value: number; }>
Enums
VolumeTypes
Members | Value |
---|---|
voice_call | 0 |
system | 1 |
ring | 2 |
default | 3 |
music | 3 |
alarm | 4 |
notification | 5 |
dtmf | 8 |
0.0.1
12 months ago