Giter Club home page Giter Club logo

nodecg-obs's Introduction

NodeCG

NodeCG

Discord Build Status Coverage Status Docker Build Status Twitter

NodeCG is a broadcast graphics framework and application. It enables you to write complex, dynamic broadcast graphics using the web platform. NodeCG has no graphics or drawing primitives of its own. Instead, NodeCG provides a structure for your code and an API to facilitate moving data between the dashboard, the server, and your graphics. It makes few assumptions about how to best code a graphic, and gives you freedom to use whatever libraries, frameworks, tools, and methodologies you want. As such, NodeCG graphics can be rendered in any environment that can render HTML, including:

Don't see your preferred streaming software on this list? NodeCG graphics require a modern browser engine. If your streaming software's implementation of browser source uses a recent-ish browser engine, chances are that NodeCG graphics will work in it. You can check what version your streaming software uses for its browser sources by opening whatversion.net/chrome as a browser source.

Have questions about NodeCG, or just want to say 'hi'? Join our Discord server!

Documentation & API Reference

Full docs and API reference are available at https://nodecg.dev

Goals

The NodeCG project exists to accomplish the following goals:

  • Make broadcast graphics (also known as "character generation" or "CG") more accessible.
  • Remain as close to the web platform as possible.
  • Support broadcasts of any size and ambition.

Let's unpack what these statements mean:

> Make broadcast graphics (also known as "character generation" or "CG") more accessible

Historically, broadcast graphics have been expensive. They either required expensive hardware, expensive software, or both. NodeCG was originally created to provide real-time broadcast graphics for Tip of the Hats, which is an all-volunteer charity fundraiser that had a budget of $0 for its first several years.

Now, it is possible to create an ambitious broadcast using entirely free software and consumer hardware. The NodeCG project embraces this democratization of broadcast technology.

> Remain as close to the web platform as possible

NodeCG graphics are just webpages. There is absolutely nothing special or unique about them. This is their greatest strength.

By building on the web platform, and not building too many abstractions on top of it, people developing broadcast graphics with NodeCG have access to the raw potential of the web. New APIs and capabilities are continually being added to the web platform, and NodeCG developers should have access to the entirety of what the web can offer.

> Support broadcasts of any size and ambition

NodeCG's roots are in small broadcasts with no budget. More recently, NodeCG has begun seeing use in increasingly elaborate productions. We believe that one set of tools can and should be able to scale up from the smallest show all the way to the biggest fathomable show. Whether you're using OBS for everything, or a hardware switcher with a traditional key/fill workflow, NodeCG can be a part of any broadcast graphics system.

Maintainers

Designers

Acknowledgements

nodecg-obs's People

Contributors

astral-arsonist avatar carlosfdez avatar hoishin avatar joshrickert avatar seldszar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nodecg-obs's Issues

Generate typedefs from an OBS scene collection

Problem Description

I often write code which needs to manipulate specific Scenes and Sources in an OBS scene collection. In these cases, I always also commit the scene collection to the bundle's git repo, to help provide some kind of assurance that the bundle's code and the OBS scene collection use the same names and expect the same structure.

However, this isn't good enough. It's still incredibly prone to easy errors, and massively critical runtime codepaths end up being completely "stringly-typed". Typos are easy and disastrous.

Proposed Solution

I would love to be able to generate a comprehensive typedef for an OBS scene collection, based on the actual scene collection's JSON file. Some sort of CLI tool which reads in that JSON, and outputs a d.ts typedef file which accurately models the entire structure of the scene collection.

This would let me have a much stronger guarantee that my code actually knows what the structure of my scene collection is, and that I'm not making obvious but dangerous mistakes such as typoing a source name.

This is of course not a perfect solution, because it does nothing to guarantee that the scene collection I've generated a typedef for is the one currently loaded into OBS. But, despite this limitation, I still think this system would provide substantial value and greatly reduce the frequency of bugs in this category.

how to fix “can't read property push of undefined” error in Nodejs?

I have coded a simple app to learn Nodejs but when i run "nodemon index.js" in cmd i have this error TypeError: Cannot read property 'push' of undefined app crashed - waiting for file changes before starting...

i have follow all instruction in the udemy course for learn nodejs and i faced this problem when i separated the file into two files index.js and genres.js

genres.js

      ` const express = require('express');
        const router = express.Router;

       //simple data 
      const genres = [{
            id: 1,
             name: 'course1'
          },
          {
            id: 2,
            name: 'course2'
          },
         {
            id: 3,
            name: 'course3'
         }
        ];

   //////////////////////////////////////////////////////////////////////
    /////////////////////////////////// Get //////////////////////////////
   //////////////////////////////////////////////////////////////////////


   router.get('/', (req, res) => {
     res.send(genres);
     });

    router.get('/:id', (req, res) => {

const genre = genres.find(c => c.id ===
    parseInt(req.params.id)); //req.params.id return string 
if (!genre)
    return res.status(404).send('The course is not found...');

res.send(genre);

res.send(req.params.id);
});

  router.get('/:year/:month', (req, res) => {
     res.send(req.params);
  });

    router.post('/', (req, res) => {
     const { error  } = validategenre(req.body);
        if (error)
      return res.status(400).send(error.details[0].message);

      const genre = {
       id: genres.length + 1,
       name: req.body.name
       }
     genres.push(genre);
        res.send(genre);
     });

       router.put('/:id', (req, res) => {

     const genre = genres.find(c => c.id === parseInt(req.params.id));
        if (!genre)
         return res.status(404).send('The course does not exist !!! ');

       const result = validategenre(req.body);
           if (result.error)
           return res.status(400).send(result.error.details[0].message);


          genre.name = req.body.name;
       res.send(genre);

      });

        function validategenre(genre) {

         const schema = {
             name: Joi.string().min(3).required()
           };
           return Joi.validate(genre, schema);

        }

     module.exports = router;`

index.js

   ` const Joi = require('joi');
     const genres = require('./routes/genres');
     const express = require('express');
      const app = express();

  app.use(express.json());
   app.use('/api/genres', genres);
   const port = process.env.PORT || 3000;
   app.listen(port, () => console.log(`Listining on port ${port}...`));`

BUG: Cannot read property 'push' of undefined

Hey there, I really enjoy nodecg, but I just cant initialize this package.
The error happens at OBSUtility (nodecg-utility-obs/index.js:32:28), where the namespace replicant is declared. Apparently I'm getting a null object from the following:
const namespacesReplicant = nodecg.Replicant('_obs:namespaces', { schemaPath: buildSchemaPath('namespaces'), persistent: false });

EDIT:
All packages have been installed successfully via npm and bower. Followed the README.MD tutorial.

Convert tests to TypeScript

Our tests are in raw JS right now, which means they aren't really testing our types, and they're a bit harder to write due to not having TS autocomplete.

We should re-write them in TS, and also ensure that we are applying the obs-websocket-js typedefs to our mock-obs-websocket-js, to ensure that our mock is the right shape.

See https://github.com/Tespa/hearthstone-parser for an example of how I like to handle tests in TypeScript (although that repo uses Mocha, not Ava, so it's not a 1:1 example).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.