open-index/open-npm huggingface dataset:
npm package: @interactivefitness/peripherals
Description: IF Peripherals
Author: Interactive Fitness
Latest version: 0.4.6

# Interactive Fitness Peripherals

This abstracts the Pulse Audio and Bluez DBus APIs into an easy to use module.

Leveraging these APIs, this code watches for bluetooth peripheral changes and audio interface changes and using an event-driven architecture gives you the ability to make adjustments to these.

## Install

It depends on the `bluez` and `@interactivefitness/paclient`

```bash
sudo apt-get install -y curl pkg-config libdbus-1-dev libdbus-glib-1-dev
yarn add @interactivefitness/peripherals @interactivefitness/paclient bluez
```

## Usage

```javascript
import { Headsets } from "./Headsets";
import Express from "express";

const app = Express();
const hs = new Headsets();
const port = 4141;

app.get("/", (req, res) => res.send("Hello World!"));

app.get("/headsets", (req, res) => res.send(hs.devices));

// init headsets
hs.init().then(() => {
  app.listen({ port: port }, () =>
    console.log(`Example app listening on port ${port}!`)
  );
});
/*
process.on("SIGINT", function() {
  hs.onDestroy(function() {
    console.error("connection closed due to app termination");
    return process.exit(0);
  });
});
*/
```

# References

- [Gnome Desktop: D-Bus](https://developer.gnome.org/platform-overview/stable/tech-d-bus.html.en)

## Bluez 5.50

### https://launchpad.net/~bluetooth/+archive/ubuntu/bluez

The below would normally work, but it is not build for xenial.

```bash
sudo add-apt-repository ppa:bluetooth/bluez
sudo apt-get update
sudo apt-get install -y bluez
#
sudo apt-get install -y libglib2.0-dev libdbus-1-dev
```

So we have to do it as follows:

- [Download libreadline7 (Bionic)](https://packages.ubuntu.com/bionic/amd64/libreadline7/download)

```bash
sudo apt install ./libreadline7_7.0-3_amd64.deb
cat > /etc/apt/sources.list.d/bluetooth-ubuntu-bluez-bionic.list
deb http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic main
# deb-src http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic main
sudo apt-get update
sudo apt-get install -y bluez
```

## MacOS

See https://github.com/zbentley/dbus-osx-examples

```bash
brew install dbus
brew services start dbus
launchctl getenv DBUS_LAUNCHD_SESSION_BUS_SOCKET
export DISPLAY=':0'
export DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/dbus/system_bus_socket'
```

## Manual Pulse Audio Configuration

```
bluetoothctl
pulseaudio --start
pactl load-module module-bluetooth-discover
pactl list short sinks
pacmd list-sinks | grep -e 'name:' -e 'index:'
pactl set-card-profile 3 a2dp_sink
pactl set-default-sink "bluez_sink.04_AA_00_0F_5C_94"
```
npm package: @interactiveplus/interactivesso-captcha-tssdk
Description: SDK for InteractiveSSO-Captcha Subsystem
Author: Meteors Liu
Latest version: 1.0.1

# Interactivesso-captcha-tssdk
Typescript SDK for Interactivesso Captcha System

## Install

```bash
npm install --save @interactiveplus/interactivesso-captcha-tssdk
```

## Development
1. Clone this repository
2. run `npm install`
3. Edit code in `src/*`
4. run `npm run build` =&gt; files will be generated in `dist/`