---
updatedAt: 2025-05-29T22:37:58.000Z
agentTools:
  projectIndex: https://slobs-platform.readme.io/llms.txt
---

# 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`

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.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Property
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        streamingStatus
      </td>

      <td>
        `offline` | `starting` | `live` | `ending` | `reconnecting`
      </td>

      <td>
        The current state of the streaming output.
      </td>
    </tr>

    <tr>
      <td>
        streamingStatusTime
      </td>

      <td>
        string
      </td>

      <td>
        An ISO-8601 timestamp string representing the time of the last streaming output state change.  Note that entering and exiting the `reconnecting` state does **not** update this timestamp.  This makes this timestamp useful for calculating an overall stream length, but may not match exact stream uptime on Twitch if the stream fully disconnected.
      </td>
    </tr>

    <tr>
      <td>
        recordingStatus
      </td>

      <td>
        `offline` | `starting` | `recording` | `stopping`
      </td>

      <td>
        The current state of the recording output.
      </td>
    </tr>

    <tr>
      <td>
        recordingStatusTime
      </td>

      <td>
        string
      </td>

      <td>
        An ISO-8601 timestamp string representing the time of the last recording output state change.
      </td>
    </tr>
  </tbody>
</Table>

# StreamInfo `object`

The stream info object represents some data about the current stream.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Property
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        title
      </td>

      <td>
        string
      </td>

      <td>
        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.
      </td>
    </tr>

    <tr>
      <td>
        game
      </td>

      <td>
        string
      </td>

      <td>
        The name of the game set on the channel (if any).
      </td>
    </tr>

    <tr>
      <td>
        viewerCount
      </td>

      <td>
        number
      </td>

      <td>
        The current number of viewers for the channel.  This number will always be `0` if the channel is offline.
      </td>
    </tr>
  </tbody>
</Table>

# outputStateChanged `event`

This event will be emitted whenever the output state object changes.  You callback will be called with an [OutputState](https://slobs-platform.readme.io/docs/streaming-recording-module#section-outputstate-object-) object.

### Example

```javascript
streamlabsOBS.v1.StreamingRecording.outputStateChanged(state => {
  console.log('Got new output state', state);
});
```

# streamInfoChanged `event`

This event will be emitted whenever the stream info changes.  You callback will be called with an [StreamInfo](https://slobs-platform.readme.io/docs/streaming-recording-module#section-streaminfo-object-) object.

### Example

```javascript
streamlabsOBS.v1.StreamingRecording.streamInfoChange(info => {
  console.log('Got new stream info', info);
});
```

# getOutputState `method`

`getOutputState(): OutputState`

This method can be used to fetch the current output state.

### Arguments

None

### Returns

[OutputState](https://slobs-platform.readme.io/docs/streaming-recording-module#section-outputstate-object-)

### Example

```text
streamlabsOBS.v1.StreamingRecording.getOutputState().then(state => {
  consolelog('Current state:', state);
});
```

# getStreamInfo `method`

`getStreamInfo(): StreamInfo`

This method can be used to fetch the current stream info.

### Arguments

None

### Returns

[StreamInfo](https://slobs-platform.readme.io/docs/streaming-recording-module#section-streaminfo-object-)

### Example

```text
streamlabsOBS.v1.StreamingRecording.getStreamInfo().then(info => {
  consolelog('Current info:', info);
});
```