Streaming / Recording Module
Required Permissions: slobs.streaming
This module provides (currently read-only) access to information about the streaming and recording output state.
Minimum Version
This was module was added in Build 2 of the Streamlabs Desktop App Developer build.
OutputState object
objectThe output state object represents the current state of the streaming and recording outputs. There is a current state, as well as a timestamp recording when the state changed.
Property | Type | Description |
|---|---|---|
streamingStatus |
| The current state of the streaming output. |
streamingStatusTime | string | An ISO-8601 timestamp string representing the time of the last streaming output state change. Note that entering and exiting the |
recordingStatus |
| The current state of the recording output. |
recordingStatusTime | string | An ISO-8601 timestamp string representing the time of the last recording output state change. |
StreamInfo object
objectThe stream info object represents some data about the current stream.
Property | Type | Description |
|---|---|---|
title | string | The title of the current stream. If the stream is offline, this will represent the title of the channel the last time it was fetched. |
game | string | The name of the game set on the channel (if any). |
viewerCount | number | The current number of viewers for the channel. This number will always be |
outputStateChanged event
eventThis event will be emitted whenever the output state object changes. You callback will be called with an OutputState object.
Example
streamlabsOBS.v1.StreamingRecording.outputStateChanged(state => {
console.log('Got new output state', state);
});streamInfoChanged event
eventThis event will be emitted whenever the stream info changes. You callback will be called with an StreamInfo object.
Example
streamlabsOBS.v1.StreamingRecording.streamInfoChange(info => {
console.log('Got new stream info', info);
});getOutputState method
methodgetOutputState(): OutputState
This method can be used to fetch the current output state.
Arguments
None
Returns
Example
streamlabsOBS.v1.StreamingRecording.getOutputState().then(state => {
consolelog('Current state:', state);
});getStreamInfo method
methodgetStreamInfo(): StreamInfo
This method can be used to fetch the current stream info.
Arguments
None
Returns
Example
streamlabsOBS.v1.StreamingRecording.getStreamInfo().then(info => {
consolelog('Current info:', info);
});Updated about 2 months ago
