File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,17 @@ _Note that all response objects will supply both the original [obs-websocket][li
7878- EventName must exactly match what is defined by the [ ` obs-websocket ` ] [ link-obswebsocket ] plugin.
7979
8080``` js
81- obs .on (' EventName' , callback (data));
81+ const callback = (data ) => {
82+ console .log (data);
83+ };
84+
85+ obs .on (' EventName' , (data ) => callback (data));
8286
8387// The following are additional supported events.
84- obs .on (' ConnectionOpened' , callback (data));
85- obs .on (' ConnectionClosed' , callback (data));
86- obs .on (' AuthenticationSuccess' , callback (data));
87- obs .on (' AuthenticationFailure' , callback (data));
88+ obs .on (' ConnectionOpened' , ( data ) => callback (data));
89+ obs .on (' ConnectionClosed' , ( data ) => callback (data));
90+ obs .on (' AuthenticationSuccess' , ( data ) => callback (data));
91+ obs .on (' AuthenticationFailure' , ( data ) => callback (data));
8892```
8993
9094#### Handling Errors
You can’t perform that action at this time.
0 commit comments