should detect when jack is plugged or unplugged
npm install jack-detection
npx cap sync
getStatus() => Promise<JackStatus>
Query the current status of the jack.
Returns: Promise<JackStatus>
Since: 1.0.0
addListener(eventName: 'jackStatusChange', listenerFunc: JackStatusChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for changes of the jack status.
Param | Type |
---|---|
eventName |
'jackStatusChange' |
listenerFunc |
JackStatusChangeListener |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Since: 1.0.0
removeAllListeners() => Promise<void>
Remove all listeners for this plugin.
Since: 1.0.0
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 |
Prop | Type |
---|---|
remove |
() => Promise<void> |
Callback to receive the status change notifications.
(status: JackStatus): void