Constructor
new Slobs(ip, token)
Parameters:
| Name | Type | Description |
|---|---|---|
ip |
string | IP Address where slobs is running. Local: http://127.0.0.1:59650/api |
token |
string | Settings->Remote Control and click on the QR-Code and then on show details. |
Example
slobs = new SlobsJS("127.0.0.1:59650/api", "token2143u323i4oy");
Methods
getConnected()
Example
var connected = slobs.getConnection();
getRecordingUptime() → {string}
Returns:
Time formatted (hh:mm:ss) or 'offline'
- Type
- string
Example
slobs.getRecordingUptime();
getScenes() → {Map}
Returns:
Map of all scenes & sources.
- Type
- Map
Example
slobs.getScenes();
getStreamingStatus() → {string}
Returns:
live / offline
- Type
- string
Example
slobs.getStreamingStatus();
getStreamUptime() → {string}
Returns:
Time formatted (hh:mm:ss) or 'offline'
- Type
- string
Example
slobs.getStreamUptime();
setActiveScene(sceneName)
Parameters:
| Name | Type | Description |
|---|---|---|
sceneName |
string | Case sensitive name of the Scene we wish to set as active. |
Example
slobs.setActiveScene("Game Scene");
toggleRecording()
Example
slobs.toggleRecording();
toggleSource(sceneName, sourceName)
Parameters:
| Name | Type | Description |
|---|---|---|
sceneName |
string | Case sensitive name of the Scene the source belongs to. |
sourceName |
string | Case sensitive name of the Source we wish to toggle. |
Example
slobs.toggleSource("Game Scene", "Webcam")
toggleStreaming()
Example
slobs.toggleStreaming();