1.0.29 • Published 1 year ago

capacitor-plugin-audio-toggle v1.0.29

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

capacitor-plugin-audio-toggle

Capacitor plugin for audio mode toggle

Install

npm install capacitor-plugin-audio-toggle
npx cap sync

API

enable()

enable() => Promise<void>

disable()

disable() => Promise<void>

reset()

reset() => Promise<void>

selectDevice(...)

selectDevice(data: { device: DeviceName; }) => Promise<void>
ParamType
data{ device: DeviceName; }

setRingtoneMode()

setRingtoneMode() => Promise<void>

getAvailableDevices()

getAvailableDevices() => Promise<{ earpiece: boolean; speakerphone: boolean; wired: boolean; bluetooth: boolean; }>

Returns: Promise<{ earpiece: boolean; speakerphone: boolean; wired: boolean; bluetooth: boolean; }>


getSelectedDevice()

getSelectedDevice() => Promise<{ selectedDevice: DeviceName; }>

Returns: Promise<{ selectedDevice: DeviceName; }>


checkPermissions()

checkPermissions() => Promise<{ granted: boolean; }>

Returns: Promise<{ granted: boolean; }>


requestPermissions()

requestPermissions() => Promise<{ granted: boolean; }>

Returns: Promise<{ granted: boolean; }>


isBluetoothEnabled()

isBluetoothEnabled() => Promise<{ enabled: boolean; }>

Returns: Promise<{ enabled: boolean; }>


openBluetoothSettings()

openBluetoothSettings() => Promise<void>

openAppSettings()

openAppSettings() => Promise<void>

addListener('onChanges', ...)

addListener(eventName: 'onChanges', listenerFunc: (data: { earpiece: boolean; speakerphone: boolean; wired: boolean; bluetooth: boolean; selectedDevice: DeviceName; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName'onChanges'
listenerFunc(data: { earpiece: boolean; speakerphone: boolean; wired: boolean; bluetooth: boolean; selectedDevice: DeviceName; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>

Type Aliases

DeviceName

'earpiece' | 'speakerphone' | 'wired' | 'bluetooth'

1.0.29

1 year ago

1.0.26

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.22

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago