Repository navigation
v4.0.0-beta1
Pre-releaseThe first prerelease of OBSClient 4.0: the client is brought up to obs-websocket 5.7.6 (3.x implemented 5.5.2), a number of long-standing connection and protocol bugs are fixed, and the library now comes with a test suite, CI/CD and a test app.
Important
This is a prerelease. It is meant to be tried, and its public API can still change before 4.0.0. A plain dotnet add package OBSClient keeps installing 3.0.1 until 4.0.0 is out.
Install
dotnet add package OBSClient --version 4.0.0-beta1OBSClient 4.0.0-beta1 on NuGet | Documentation | Moving from 3.x to 4.0
What's new
- obs-websocket 5.7.6, including the multi-canvas support of 5.7.0:
GetCanvasList, theCanvasCreated,CanvasRemovedandCanvasNameChangedevents, and acanvasUuidon every request that looks up a scene or a source by name. The library targetsnet8.0andnet10.0. - One argument for a name or a UUID.
SceneRef,InputRefandSourceRefreplace the pairs of overloads. Astring, aGuid, or theSceneorInputthat OBS Studio gave you convert implicitly, soSetCurrentProgramScene("Gaming Scene")still reads the same. - Part of a transform.
SceneItemTransformUpdatechanges some members of the transform of a scene item without sending the others:current.ToUpdate() with { ScaleX = 2 }. - Generated from the protocol. The requests, responses, events and enums come from obs-websocket's own
protocol.json, and conformance tests check every request and event against it, together with captures of a real OBS Studio. It is still one assembly. - A test app (WinUI 3, Fluent 2) to try every request and event by hand against your own OBS Studio. It shows what the client returned, what OBS Studio sent, and a comparison of the two.
Fixes that matter
SetInputSettingsno longer ends the connection. No response type was registered for it, so reading the answer threw inside the receive loop: the connection was dead whileConnectionStatekept sayingConnected(#17, and the symptoms of #15). A receive loop that ends for any reason now always cleans up, soConnectionClosedis raised andAutoReconnectworks.- Requests that are waiting when the connection is lost fail at once.
ConnectAsyncno longer hangs when the connection is lost during the handshake. A response that arrives after its request timed out can no longer take the connection down. haltOnFailureof a request batch takes effect, the data of aCustomEventarrives, state changes of inputs and scene items are no longer dropped, and a password with a non-ASCII character authenticates.- Requests that could never succeed now do:
SetInputMuteby UUID,GetInputDeinterlaceFieldOrder,GetInputAudioMonitorType,CreateRecordChapter, andGetSceneSceneTransitionOverridefor a scene without an override.
Breaking changes
Most code that compiled against 3.x still compiles, but it has to be recompiled. What does break: named arguments (inputName: and sceneName: are now input: and scene:), a method group converted to a delegate, the settings type of CreateInput and SetCurrentSceneTransitionSettings, Scene (a UUID is required and the index is nullable), CreateRecordChapter (it returns Task), and a few members that are nullable now. Moving from 3.x to 4.0 lists all of it, with the fix for each, and the CHANGELOG has the complete history.
Assets
| File | What it is |
|---|---|
OBSClient.4.0.0-beta1.nupkg |
The package: the exact file that was pushed to nuget.org and to GitHub Packages. |
OBSClient.TestApp-4.0.0-beta1-win-x64.zip |
The test app. Unzip it and start OBSClient.TestApp.exe. It is self-contained (nothing else has to be installed), built for Windows 10 version 1809 and later, x64. It is not code signed, so Windows may warn that the publisher is unknown; compare the checksum below. |
SHA-256:
c69971d3899bca85c8e21b161e2d2483de0174f084577c946ef0df338a9927d3 OBSClient.4.0.0-beta1.nupkg
9a30e9fea7e3718a12cfe261dd257bb80981a0084f8e5067bbf760f91d6c7ff9 OBSClient.TestApp-4.0.0-beta1-win-x64.zip
Please report what you find in an issue. Thanks to @Kenshin9977, @FaNim21 and @gdantuono for the reports that led to the connection fixes.