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

@b3nelly/change-obs-scene

v1.3.1

Published

With just a few lines of code, automate changing your OBS scenes. Happy streaming! ๐Ÿ’œ

Downloads

13

Readme

@b3nelly/change-obs-scene Node.js npm Package

With just a few lines of code, automate changing your OBS scenes using the @b3nelly/change-obs-scene npm package. ๐Ÿ’œ

Dependancies

Installation

npm install @b3nelly/change-obs-scene

Usage

First, launch OBS and enable the WebSocket Server

Tools > WebSocket Server Settings:

  • obs websocket server settings image
  • Don't forget to set your Server Password
  • If you do not set a password, you do not need to pass the obsWebSocketServerPassword param to changeScene()

Simple Usage Example

const changeScene = require("@b3nelly/change-obs-scene").default;
const intervalInSeconds = 30; // 30 seconds per scene
changeScene(intervalInSeconds); // it's that simple.

CommonJS (cjs) Usage Example

const changeScene = require("@b3nelly/change-obs-scene").default;

const obsSkipScenes = [];
const intervalInSeconds = 30;
const obsWebSocketServerPassword = "your-password-here";
const obsWebSocketServerURL = "ws://localhost:4455";

changeScene(
  intervalInSeconds,
  obsSkipScenes,
  obsWebSocketServerPassword,
  obsWebSocketServerURL
);

ECMAScript Module (esm) Usage Example

import changeScene from "@b3nelly/change-obs-scene";

const obsSkipScenes = [];
const intervalInSeconds = 30;
const obsWebSocketServerPassword = "your-password-here";

changeScene(intervalInSeconds, obsSkipScenes, obsWebSocketServerPassword);

Asynchronous Module Definition (amd) Usage Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>AMD Example</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
    <script>
      require.config({
        paths: {
          changeScene: "@b3nelly/change-obs-scene/dist/change-obs-scene.amd",
        },
      });

      require(["changeScene"], function (changeScene) {
        const obsSkipScenes = [];
        const intervalInSeconds = 90;
        const obsWebSocketServerPassword = "your-password-here";

        changeScene(
          intervalInSeconds,
          obsSkipScenes,
          obsWebSocketServerPassword
        );
      });
    </script>
  </head>
  <body></body>
</html>

API

changeScene(
  intervalInSeconds,
  obsSkipScenes,
  obsWebSocketServerPassword,
  obsWebSocketServerURL
);

| Parameter | Type | Default | Description | | :-------------------------------------- | :-------------: | :----------------------: | ----------------------------------------------------- | | intervalInSeconds (optional) | number | 60 | Number of seconds between each scene | | obsSkipScenes (optional) | Array<string> | [] | An array of scene names to skip when switching scenes | | obsWebSocketServerPassword (optional) | string | undefined | OBS WebSocket Server Password | | obsWebSocketServerURL (optional) | string | "ws_://localhost:4455" | OBS WebSocket Server URL / IP |

change-obs-scene In Action

Working change obs scene example image

CLI

npm run cli

You will be prompted to enter in the changeSence() params. Leave param blank to use default value.

Build

npm run build

Running the build command will automatically create the dist/ dir and create/update the cjs, esm, and amd files inside.

Configuration file rollup.config.js

Development Dependancies

License

MIT

This README.md file provides installation and usage instructions, as well as a brief description of the API for the @b3nelly/change-obs-scene package. Feel free to modify it as needed.