0.0.6 • Published 1 year ago

jack-detection v0.0.6

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

jack-detection

should detect when jack is plugged or unplugged

Install

npm install jack-detection
npx cap sync

API

getStatus()

getStatus() => Promise<JackStatus>

Query the current status of the jack.

Returns: Promise<JackStatus>

Since: 1.0.0


addListener('jackStatusChange', ...)

addListener(eventName: 'jackStatusChange', listenerFunc: JackStatusChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for changes of the jack status.

ParamType
eventName'jackStatusChange'
listenerFuncJackStatusChangeListener

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 1.0.0


removeAllListeners()

removeAllListeners() => Promise<void>

Remove all listeners for this plugin.

Since: 1.0.0


Interfaces

JackStatus

Represents the state and type of the jack connection.

PropTypeDescriptionSince
connectedbooleanWhether the jack is plugged or not.1.0.0

PluginListenerHandle

PropType
remove() => Promise<void>

Type Aliases

JackStatusChangeListener

Callback to receive the status change notifications.

(status: JackStatus): void

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago