Giter Club home page Giter Club 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 gyp project file in repository what can be used to make node module.

To setup env and make a build use command

yarn install
yarn build 

Module file will be in 'build\Release'

And to make build again after source code changed

yarn node-gyp build

To work on electron 2 it can be required to set older version of nodejs

nvm use 8.x.x
set MODULE_VERSION=x.x.x
yarn install 
yarn build  
node scripts\pack.js 

To make debug build for nodejs tests

yarn node-gyp --debug configure rebuild 

Pack

Use command 'node script\pack.js' to make a package for slobs.

It uses version from package.json so update it to a new value.

Requirements

  • node
  • yarn
  • python 2.7
  • 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

eddygharbi avatar gettintoasty avatar prsdamasceno avatar summeroff avatar xoredg avatar

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.