🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

obs-ws-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obs-ws-sdk

支持完整类型安全与运行时验证的 OBS WebSocket TypeScript SDK. TypeScript SDK for OBS WebSocket with full type safety and runtime validation.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

obs-ws-sdk

A high-level TypeScript SDK for OBS WebSocket, built on top of obs-websocket-js with zod runtime validation.

Features

  • Full Type Safety — Precise TypeScript types for all requests and responses
  • Semantic API — Namespace-style method calls instead of raw string-based requests
  • Runtime Validation — Zod schemas validate both request parameters and responses
  • IDE Support — Complete IntelliSense and auto-completion

Install

pnpm add obs-ws-sdk

Usage

import { OBSDK } from 'obs-ws-sdk'

const sdk = new OBSDK()
await sdk.connect('ws://localhost:4455', 'your-password')

// Namespace-style API with full type safety
const version = await sdk.general.getVersion()
console.log(version.obsVersion)

const scenes = await sdk.scenes.getSceneList()
console.log(scenes.scenes)

await sdk.scenes.setCurrentProgramScene({ sceneName: 'Scene 1' })

// Event handling (transparent passthrough from obs-websocket-js)
sdk.on('CurrentProgramSceneChanged', (event) => {
  console.log('Scene changed to:', event.sceneName)
})

await sdk.disconnect()

Modules

ModuleDescription
sdk.generalVersion info, stats, hotkeys, custom events
sdk.configScene collections, profiles, video/stream settings
sdk.sourcesSource active state, screenshots
sdk.scenesScene list, program/preview scene, create/remove
sdk.inputsInput management, settings, audio controls
sdk.transitionsTransition kinds, current transition, T-Bar
sdk.filtersFilter management, settings, enable state
sdk.sceneItemsScene item list, transform, enable/lock state
sdk.outputsVirtual cam, replay buffer, output management
sdk.streamStream status, start/stop/toggle
sdk.recordRecord status, start/stop/pause/resume
sdk.mediaInputsMedia input status, cursor, playback actions
sdk.uiStudio mode, dialogs, projectors

License

MIT

Keywords

obs

FAQs

Package last updated on 27 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts