1.3.0 • Published 4 years ago

jimaku-server v1.3.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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.

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'
1.2.0

4 years ago

1.2.2

4 years ago

1.1.3

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago