Reasons | Getting Started | Environment Variables | Issues
node-obs proved to be difficult to work with. The following are just a few reasons why a new set of bindings were warranted:
- Lack of objects altogether making context harder to control
- What objects we do use, v8 cannot control their lifetimes
- Difficult to use over the Electron IPC (or any IPC)
- Requirement to constantly sync between frontend and backend
- Lack of flexibility and feature for the frontend
- An unintuitive interface that was difficult to use and error prone
- The lack of a scene item object which didn't allow for duplicate sources.
- And probably more I'm not thinking of right now.
Because the alternative is gyp which is deprecated. Frankly, node-gyp shouldn't be used anymore since it's incredibly difficult to use outside of simple use-cases.
I've tried to simplify the build system as much as possible to streamline going from nothing to a working library.
- Currently only Windows is supported
- Note that it shouldn't take much to add other platforms.
- VC++ 14 (2015)
- CMake 3.0 or higher - Website(https://obsproject.com/downloads/dependencies2013.zip)
- yarn - Website
The rest are handled through package management.
Simply checkout the module and use yarn or yarn install. npm install should also work although I've not tested it.
Building the documentation couldn't be more simple. Make sure you've done the initial setup and do yarn docs. It will output static HTML inside of a folder called 'docs' in the root directory.
The environment variables are only used if you build manually or if you set them as globals. I don't recommend either but these are used to get the build system working so changing them is also required to work. In particular, a useful variable is OBS_BUILD_TYPE which you can set to Debug to magically compile things in debug mode. Note that since index loads the node by name, changing OSN_NODE_NAME will current break the export script.
- ENABLE_DISTRIBUTION - [ Default:
false] - OSN_DIST_DIR - [ Default:
"distribute"] - OSN_NODE_NAME - [ Default:
"obs_node"] - OBS_BUILD_TYPE - [ Default:
Release] - OBS_STUDIO_PATH - [ Default:
${CMAKE_SOURCE_DIR}/obs-build] - OBS_STUDIO_BUILD64 - [ Default:
${OBS_STUDIO_PATH}/build64] - OBS_STUDIO_DEPS64 - [ Default:
${OBS_STUDIO_PATH}/dependencies2015/win64]
- Need to add support for other platforms.
- Need the code base to be used and practically tested.