Closed SReject closed 4 years ago
I've taken a bit of time, from a ES/JS developer standpoint, to write a short draft of what the interface should look like; it can be found HERE
Any updates regarding this?
Alrighty, please review & test #186 which should cover requests 2 and 3. Let me know if I've missed anything you need!
1 - Passed Data Typings
With the
obsSceneChanged
event,<event>.detail
is a JS object, similar to:But with
window.obsstudio.getCurrentScene()
when the callback is called, thedata
argument is a non-parsed JSON string, resulting indata
having to be passed throughJSON.parse()
before it is usable:I feel the JSON data of the latter should be parsed into a JS object as it is with the former.
2 - Different design patterns for similar functionality
The interface is all over the place on design for similar functionality sets. For example
.onVisibilityChange
is a property that gets set with a handler function while other events use thewindow.addEventListener()
methodology.3 - Incompleteness
Scenes have a
getCurrentScene
method and anonSceneChange
event, butonVisibilityChange
doesn't have an accompanying getter function; nor do theobsStreaming*
andobsRecording*
events.Win10 - Home Edition
OBS Studio: 18.0.1 BrowserSource: v1.29.0