Coder Social home page Coder Social logo

streamlabs-overlay's Introduction

Overlay

overlay - it is a window what try to stay over any other windows( even fullscreen games ) and show content of some source.

source - can be other window like chat or cpu monitor.

It should be build as nodejs module.

NodeJS Module

Build

There is cmake project file in repository what can be used to make node module.

To setup env

yarn install

To configure a build

mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64  ../ 

And to make a build

cmake --build . --config Release

Requirements

  • node
  • yarn
  • msbuild (vs studio make tools )

Module use examples

Examples to show api usage for simple usecases.

yarn electron examples\example_with_offscreen.js	  
yarn electron examples\example_interactivity_console.js
yarn electron examples\example_interactivity_window.js

Module API

Each overlay has ID by which it can be adressed in api.

Thread what control overlays have to be started and stoped explicitly by module user

  • start()
  • stop()

For now overlays can be shown and hidden all together

  • show()
  • hide()

To get basic info about overlays

  • getCount()
  • getIds() it return list of overlay ids.
  • getInfo(overlay_id)

To create, setup and remove overlay

  • addHWND(hwnd) return overlay id
  • setPosition(overlay_id, x, y, width, height)
  • setTransparency(overlay_id, transparency) from 0 to 255 like in SetLayeredWindowAttributes
  • reload(overlay_id) send web view a command to reload current page
  • remove(overlay_id)
  • paintOverlay(overlay_id, width, height, bitmap)

For interective mode set callbacks and switch on/off. See examples\example_with_hwnd_node.js.

  • setMouseCallback(callback)
  • setKeyabordCallback(callback)
  • switchInteractiveMode()

streamlabs-overlay's People

Contributors

dependabot[bot] avatar eddygharbi avatar gettintoasty avatar prsdamasceno avatar stevensoftware52 avatar summeroff avatar xoredg avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

streamlabs-overlay's Issues

make: *** No rule to make target `Release/obj.target/streamlabs_overlay/src\*.o', needed by `Release/streamlabs_overlay.node'. Stop.

Hi Team, I tried to setup this code in my Ma. I followed the steps from this guide to have the environment.

Environment:
Mac: 10.14.6
node: v12.6.0
node-gyp v6.1.0
npm 6.4.1
yarn 1.17.3
Python: 2.7

I changed the node version to 10.15.3. But still I get the following error when I do 'yarn install'.

ShanmugajasMBP2:streamlabs-overlay-master sgovindan$ yarn install
yarn install v1.17.3
[1/5] ๐Ÿ” Validating package.json...
[2/5] ๐Ÿ” Resolving packages...
success Already up-to-date.
$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.10 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/tmp/.gyp/10.15.3/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/tmp/.gyp/10.15.3',
gyp info spawn args '-Dnode_gyp_dir=/Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/tmp/.gyp/10.15.3/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: *** No rule to make target Release/obj.target/streamlabs_overlay/src\*.o', needed by Release/streamlabs_overlay.node'. Stop.
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/sgovindan/workspace/streamlabs/streamlabs-overlay-master
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
You have new mail in /var/mail/sgovindan
ShanmugajasMBP2:streamlabs-overlay-master sgovindan$

Is there any environment setup is missing? or Can you provide some detailed setup information on Readme.

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.