npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

meld-studio-websocket-js

v0.0.6

Published

Meld Studio Websocket Javascript API

Downloads

9

Readme

meld-studio-websocket-js

Meld Studio WebSocket controller built on slobs-websocket-js Updated last for Meld Studio version: 0.7.1.3

Installation

# NPM Install
npm install meld-studio-websocket-js

# Yarn Install
yarn add meld-studio-websocket-js

Usage

Untested in browser, currently supported in node.

Node Import Methods

// CommonJS
const MeldStudiosWebSocket = require("meld-studio-websocket-js");

Connecting

  • Address is optional private connection: 127.0.0.1 | public connection: 0.0.0.0

  • Port is optional default: 13376

const MeldStudioWebSocket = require('./libs/MeldStudiosWebSocket');
const meldStudio = new MeldStudioWebSocket();

meldStudio.connect({
	address: '127.0.0.1',
	port: 13376
})

meldStudio.test().then(data => {
  console.log(data)
})

Requests

All available requests can be found below. Check the Meld Studio Streamdeck documentation if you want to look at the requests more in depth.

// A test function that will tell you if connected to Meld Studio and return Meld object.
meldStudio.test()

// This will return the current scene in Meld Studio.
meldStudio.findCurrentScene()

// Switches to the specified scene.
meldStudio.showScene('Scene Name')

// Toggles mute status of an audio track.
meldStudio.toggleMute('Audio Track Name')

// Toggles monitoring status of an audio track.
meldStudio.toggleMonitor('Audio Track Name')

// Toggles visibility of a layer within a scene.
meldStudio.toggleLayer('Layer Name')

// Toggles the enabled status of an effect within a layer.
meldStudio.toggleEffect('Layer Name', 'Effect Name')

// Toggles the recording status.
meldStudio.toggleRecord()

// Toggles the streaming status.
meldStudio.toggleStream()

// Registers an observer for changes to a specific track.
meldStudio.registerTrackObserver('Context', 'Track Name')

// Unregisters an observer for a specific track.
meldStudio.unregisterTrackObserver('Context', 'Track Name')

// Adjusts the gain for an audio track.
meldStudio.setGain('Audio Track Name', 0.0)

// Sends a custom event.
meldStudio.sendEvent("Screenshot")

// Prepares a scene for switching without making it live.
meldStudio.setStagedScene("Scene Name")

// Switches to the prepared staged scene.
meldStudio.showStagedScene()

// Shows status if you are streaming.
meldStudio.isStreaming()

// Shows status if you are recording.
meldStudio.isRecording()

//  Listener - Returns session data.
meldStudio.sessionChanged()

// Listener - Returns boolean stating if you are streaming or not.
meldStudio.isStreamingChanged()

//  Listener - Returns boolean stating if you are recording or not.
meldStudio.isRecordingChanged()

// Example
meldStudios.test().then(data => {
  console.log(data)
})

Errors

WebSocket errors besides the initial socket connection will be thrown as uncaught errors. All other errors can be caught using .catch() when sending request.