@evilkiwi/xjs
provides a simple hook which can be used to connect to and consume the XSplit Broadcaster XJS Plugin.
Installation
This package is available via NPM:
yarn add @evilkiwi/xjs
# or
npm install @evilkiwi/xjs
Usage
import { xjs, Subscription } from '@evilkiwi/xjs';
const client = await xjs({ debug: true });
// Asynchronous requests.
const activeScene = await client.getActiveScene();
// Subscriptions.
client.events.on(Subscription.SceneChange, ({ id }: any) => {
console.log(`Active Scene was changed to ${id}`);
});
client.subscribe(Subscription.SceneChange);
To-do
- Fully type the responses and provided methods from XJS
- Allow running in NodeJS via
ws