obs-websocket icon indicating copy to clipboard operation
obs-websocket copied to clipboard

Requests: Add SaveOutputScreenshot

Open oleksandrpodran opened this issue 2 years ago • 0 comments

Description

Adds a new request called SaveOutputScreenshot which takes a screenshot of the main OBS output.

Motivation and Context

I am currently developing a plugin that utilizes the OBS WebSocket Server. One of the essential commands I need to include is the ability to capture an output screenshot. This command must be made available in the OBS WebSocket Server.

How Has This Been Tested?

Tested OS(s): macOS Ventura 13.4.1 Testing method: Postman After successfully connection, I send this command:

{
    "op": 6,
    "d": {
        "requestType": "SaveOutputScreenshot",
        "requestId": "19b2e224-67b8-470a-a216-fc0f6a87160e"
    }
}

Then I received responses:

{
    "d": {
        "requestId": "19b2e224-67b8-470a-a216-fc0f6a87160e",
        "requestStatus": {
            "code": 100,
            "result": true
        },
        "requestType": "SaveOutputScreenshot"
    },
    "op": 7
}
{
    "d": {
        "eventData": {
            "savedScreenshotPath": "/Users/oooooo/Movies/Screenshot 2023-07-24 15-52-42.png"
        },
        "eventIntent": 1024,
        "eventType": "ScreenshotSaved"
    },
    "op": 5
}

Types of changes

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 master or a release/* branch.
  • [x] The code has been tested.
  • [x] I have included updates to all appropriate documentation.

oleksandrpodran avatar Jul 24 '23 14:07 oleksandrpodran