@ottimis/capacitor-volumes
TypeScript icon, indicating that this package has built-in type declarations

6.1.0 • Public • Published

@ottimis/capacitor-volumes

Manage device volume from capacitor.

Get volume level in a range between 0 and 1. 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

Dependencies (0)

    Dev Dependencies (15)

    Package Sidebar

    Install

    npm i @ottimis/capacitor-volumes

    Weekly Downloads

    8

    Version

    6.1.0

    License

    MIT

    Unpacked Size

    28.9 kB

    Total Files

    27

    Last publish

    Collaborators

    • mmoriani
    • ottimisgroup
    • gbetto
    • edoardo.croce