项目作者: mrjosh

项目描述 :
🔌 Streamlabs-OBS websocket javascript client
高级语言: JavaScript
项目地址: git://github.com/mrjosh/streamlabs-obs-socket-client.git
创建时间: 2020-08-02T02:21:49Z
项目社区:https://github.com/mrjosh/streamlabs-obs-socket-client

开源协议:MIT License

下载


Discord
License

Streamlabs-OBS Websocket Javascript Client

Connect and control Streamlabs-OBS websocket.

How to use

Get Token

In Streamlabs OBS, go to Settings->Remote Control and click on the QR-Code and then on show details

Usage

  1. const StreamlabsOBSClient = require("streamlabs-obs-socket-client")
  2. const client = new StreamlabsOBSClient({
  3. token: "{YOUR-SLOBS-ACCESS-TOKEN}",
  4. port: 59650,
  5. uri: "localhost",
  6. });
  7. // create slobs websocket connection
  8. client.connect().then(() => {
  9. // change the scene
  10. client.changeScene("Desktop")
  11. })

Available Methods

Method Description
client.getScenes() get available scenes
client.changeScene(sceneName = String) change the current scene
client.changeSourceVisibility(sceneName = String, sourceName = String, visibility = Bool) change source visibility of an item in a scene
client.toggleSourceVisibility(sceneName = String, sourceName = String) toggle visibility of an item in a scene
client.getSourceItemFromScene(sceneName = String, sourceName = String) get a source item from a scene

Contributing

Thank you for considering contributing to this project!

License

The MIT License (MIT). Please see License File for more information.