Inconsistancy with JS hooks #72
Labels
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser#72
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
1 - Passed Data Typings
With the
obsSceneChangedevent,<event>.detailis a JS object, similar to:But with
window.obsstudio.getCurrentScene()when the callback is called, thedataargument is a non-parsed JSON string, resulting indatahaving 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
.onVisibilityChangeis a property that gets set with a handler function while other events use thewindow.addEventListener()methodology.3 - Incompleteness
Scenes have a
getCurrentScenemethod and anonSceneChangeevent, butonVisibilityChangedoesn't have an accompanying getter function; nor do theobsStreaming*andobsRecording*events.Win10 - Home Edition
OBS Studio: 18.0.1
BrowserSource: v1.29.0
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!