2.4.1 • Published 2 years ago

studiomonitor-api v2.4.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

StudioMonitor-API

This is simple API you can use to control a NDI Tools Studio Monitor. Studio Monitor is a free multi NDI Player that's includes in NDI Tools .

Usage

  1. Install the package using npm install studiomonitor-api
  2. Import the module into your file with const { StudioMonitor } = require("studiomonitor-api");
  3. Create a new instance of the StudioMonitor API with var monitor = new StudioMonitor("127.0.0.1", 81)

Example

const { StudioMonitor } = require('studiomonitor-api');

var monitor = new StudioMonitor('127.0.0.1', 81, ready);

function ready() {
	monitor
		.getSources()
		.then((sources) = > {
			console.log('Sources:', sources);

			if (sources.length  > 0) {
				monitor.setSource(sources[ i ]).then(() = > console.log('Set source')).catch(console.error);
			}
		})
		.catch(console.error);
}

Documentation

new StudioMonitor( ipAddress , port , readyCallback(err?:Error) )

Create a new instance of the StudioMonitor API |Argument|Type|Description |-|-|-| |ipAddress|String|The IP address of the StudioMonitor| |port|Number|The port of the StudioMonitor.| |readyCallback|Function|Function that will be called when the API is ready. When something is wrong the first argument of the callback will contain an error.|

StudioMonitor.getSources() -> Promise< string >

Get a list of all available NDI sources.

StudioMonitor.getCurrentSource() -> Promise< void >

get the current NDI source.

StudioMonitor.setSource( sourceName ) -> Promise< void >

Set the current NDI source. |Argument|Type|Description |-|-|-| |sourceName|String|The name of the NDI Source|

StudioMonitor.setRecording( state ) -> Promise< void >

Set the recording state of the StudioMonitor. |Argument|Type|Description |-|-|-| |state|Boolean|Start/stop recording |

StudioMonitor.isRecording( state ) -> Promise< boolean >

Get the recording state of the StudioMonitor.

StudioMonitor.setLowBandwidth( state ) -> Promise< void >

Set the low bandwidth state of the StudioMonitor. |Argument|Type|Description |-|-|-| |state|Boolean|Start/stop low latency |

StudioMonitor.isLowBandwidth( state ) -> Promise< boolean >

Get the low bandwidth state of the StudioMonitor.

Todo

  • Add more missing functions
2.4.1

2 years ago

2.4.0

2 years ago

2.3.0

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago