jack-detection
v0.0.6
Published
should detect when jack is plugged or unplugged
Readme
jack-detection
should detect when jack is plugged or unplugged
Install
npm install jack-detection
npx cap syncAPI
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> & PluginListenerHandleListen for changes of the jack status.
| Param | Type |
| ------------------ | ----------------------------------------------------------------------------- |
| eventName | 'jackStatusChange' |
| listenerFunc | JackStatusChangeListener |
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.
| Prop | Type | Description | Since |
| --------------- | -------------------- | ----------------------------------- | ----- |
| connected | boolean | Whether the jack is plugged or not. | 1.0.0 |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
Type Aliases
JackStatusChangeListener
Callback to receive the status change notifications.
(status: JackStatus): void
