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
object
The 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
object
The 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
event
This 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
event
This 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
method
getOutputState(): 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
method
getStreamInfo(): 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 23 days ago