obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.9k stars 707 forks source link

Feature Request: Interruptible request batches #1246

Open Nixill opened 3 months ago

Nixill commented 3 months ago

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

Three related things:

1. RequestStatus::Interrupted

Given a value of 208 or whatever's next in the 200s at the time of implementation, this request status is the returned status for unprocessed inner requests within a request batch. If haltOnError was true, then this is only returned for the first interrupted inner request; otherwise, it is returned for all unprocessed inner requests.

2. Request: InterruptRequestBatch

Interrupts a running request batch sent by the same client.

Cannot interrupt an inner request that is in the middle of being processed, unless that inner request is a Sleep request. If not, the next request to be processed (and all thereafter) will instead be skipped with an Interrupted request status.

Has the following three parameters.

Name Type Description Default
requestBatchId String The top-level ID of the request to interrupt N/A
?innerRequestId String The ID of the inner request before which execution should be halted The next inner request to be processed
?comment String String The comment that should be provided alongside RequestStatus::Interrupted None

Some potential returned Request Status codes include:

3. Request batch parameter: interruptOnDisconnect

Placed directly in the d of a request batch message. Defaults to false, preserving current behavior. When true, if the client that sends this request batch disconnects in the middle of its execution, it is interrupted immediately.

Requested Feature Usage Scenario

It would be nice to be able to interrupt animations that I've started from the websocket client.

Edit

Made the headings within the "Requested Feature" heading a lower level than that heading itself.

Nixill commented 3 months ago

... This would be especially useful when I accidentally send a 15 minute long batch request because I changed something 30 seconds long from 1fps to 30fps without cutting the sleep from 30 frames to 1 frame.

Oceanity commented 2 months ago

+1

dennisrijsdijk commented 2 months ago

+1

CKY- commented 2 months ago

+1

phroggster commented 2 months ago

+2