Changd obs-websocket-sharp to High-Volume-Events support
This commit is contained in:
parent
0aaa832140
commit
8df5d8e14e
@ -29,9 +29,10 @@ public class Blur
|
||||
this.BlurWindows.AddRange(blurWindows);
|
||||
this._displayCaptureName = displayCaptureName;
|
||||
|
||||
_websocket.CurrentProgramSceneChanged += WebsocketOnCurrentProgramSceneChanged;
|
||||
_websocket.Connected += WebsocketOnConnected;
|
||||
_websocket.Disconnected += WebsocketOnDisconnected;
|
||||
_websocket.SceneItemTransformChanged += WebsocketOnSceneItemTransformChanged;
|
||||
_websocket.CurrentProgramSceneChanged += WebsocketOnCurrentProgramSceneChanged;
|
||||
|
||||
_websocket.ConnectAsync(obsUrl, obsPassword);
|
||||
|
||||
@ -210,5 +211,13 @@ public class Blur
|
||||
UpdateBlurs();
|
||||
}
|
||||
|
||||
|
||||
private void WebsocketOnSceneItemTransformChanged(object? sender, SceneItemTransformEventArgs e)
|
||||
{
|
||||
_logger?.LogInformation("Obs SceneItemTransform Changed");
|
||||
if (!EnabledObsScenes.Contains(e.SceneName))
|
||||
return;
|
||||
if (_websocket.GetSceneItemId(_currentObsScene, _displayCaptureName, 0) != uint.Parse(e.SceneItemId))
|
||||
return;
|
||||
SetScaleFactors(e.Transform);
|
||||
}
|
||||
}
|
@ -9,7 +9,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GlaxLogger" Version="1.0.7.2" />
|
||||
<PackageReference Include="obs-websocket-dotnet" Version="5.0.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="obs-websocket-dotnet-glax" Version="5.1.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user