@@ -29,6 +29,7 @@ public OBSWebSock()
2929 }
3030 }
3131
32+ //Controll
3233 public static void SetSourceEnabled ( string Source , bool Enabled )
3334 {
3435 SendPackage ( "SetSceneItemProperties" , new Dictionary < string , string > ( ) {
@@ -50,6 +51,13 @@ public static void SetSourcePosition(string Source, string x, string y)
5051 { "position" , "{\" x\" :" + x + ",\" y\" :" + y + "}" }
5152 } ) ;
5253 }
54+ public static void SetSourceScale ( string Source , string x , string y )
55+ {
56+ SendPackage ( "SetSceneItemProperties" , new Dictionary < string , string > ( ) {
57+ { "item" , Source } ,
58+ { "scale" , "{\" x\" :" + x + ",\" y\" :" + y + "}" }
59+ } ) ;
60+ }
5361 public static void SetScene ( string Scene )
5462 {
5563 SendPackage ( "SetCurrentScene" , new Dictionary < string , string > ( ) {
@@ -68,14 +76,14 @@ public static void SendTransition()
6876 SendPackage ( "TransitionToProgram" , new Dictionary < string , string > ( ) ) ;
6977 }
7078
79+ //Tech Met
7180 public static void ReAuth ( )
7281 {
7382 if ( WSock == null || ! WSock . IsAlive )
7483 return ;
7584 MSGID ++ ;
7685 WSock . Send ( @"{""request-type"":""GetAuthRequired"",""message-id"":""-2""}" ) ;
7786 }
78-
7987 private static void SendPackage ( string Type , Dictionary < string , string > parames )
8088 {
8189 if ( ! WSock . IsAlive )
@@ -92,6 +100,8 @@ private static void SendPackage(string Type,Dictionary<string,string> parames)
92100 MSGID ++ ;
93101 WSock . Send ( @"{""request-type"":""" + Type + @"""," + parameters + @"""message-id"":""" + MSGID + @"""}" ) ;
94102 }
103+
104+ //WebSocket Methods
95105 private void WSock_OnOpen ( object sender , EventArgs e )
96106 {
97107 MSGID ++ ;
0 commit comments