jimaku-server
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

jimaku-server

Actions Status npm version

jimaku-server can show a comment on the screen in your live stream through browser source of a streaming encoder, such as OBS.

Installation

Install with npm.

npm install jimaku-server

Usage

How to run with node.js

Run the server.

import JimakuServer from 'jimaku-server'

let server = new JimakuServer()
server.listen(3000)

Open http://localhost:3000 with a web browser, such as brower source of OBS. obs

Execute showJimaku() method to show a comment on the browser. Optionally, You can specify css in the second argument. The comment is shown on the screen until you execute hideJimaku() method or the next showJimaku method.

import JimakuServer from 'jimaku-server'

let server = new JimakuServer()
server.listen(3000)

server.showJimaku('Hello Jimaku')
server.showJimaku('Bye', {"color": "blue", "font-size": "30px"})

setTimeout(()=>{
  server.hideJimaku()
}, 10000)

How to run with CLI

You can use jimaku-server command after installing jimaku-server with npm.

jimaku-server

You can show a comment on the browser by setting the comment on jimaku parameter and then requesting /show_jimaku.
Note: The parameters should be UTF-8 and be done URL encoding.

curl -X GET 'http://localhost:3000/show_jimaku?jimaku=Hello%20Jimaku'

In addition to jimaku parameter, you can set css as JSON format on style parameter.

curl -X GET 'http://localhost:3000/show_jimaku?jimaku=Hello%20Jimaku&style=%7B%22color%22%3A%22red%22%2C%22font-size%22%3A%2235px%22%7D'

The style parameter above means like this.

{"color":"red","font-size":"35px"}

The comment is shown until you request /hide_jimaku as well.

curl -X GET 'http://localhost:3000/hide_jimaku'

Readme

Keywords

none

Package Sidebar

Install

npm i jimaku-server

Weekly Downloads

0

Version

1.3.0

License

MIT

Unpacked Size

623 kB

Total Files

13

Last publish

Collaborators

  • mrhorin