obs-websocket
obs-websocket copied to clipboard
Requests: Add CloseMainWindow
depends on https://github.com/obsproject/obs-studio/pull/8889
Description
Adds a new request called CloseMainWindow which closes the main window and cleanly shuts down OBS.
Motivation and Context
This request allows external applications to cleanly shut down OBS.
It implements https://github.com/obsproject/obs-websocket/issues/511
How Has This Been Tested?
Tested OS(s): Windows 10 Testing method: Postman
After connecting and handshaking, I sent this payload:
{
"op": 6,
"d": {
"requestType": "CloseMainWindow",
"requestId": "19b2e634-67b8-470a-a216-fc0f6a87160e"
}
}
OBS (with the changes in the obs-studio PR linked at the top) responded by cleaning up its resources and shutting down. The events of the shutdown can be seen through the websocket:
Types of changes
- New request/event (non-breaking)
Checklist:
- [x] I have read the Contributing Guidelines.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] My code is not on
masteror arelease/*branch. - [x] The code has been tested.
- [ ] I have included updates to all appropriate documentation.