Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Create/Delete Button and Set Button Actions #2928

Closed
2 tasks done
DhSufi opened this issue Jun 22, 2024 · 2 comments
Closed
2 tasks done

API Create/Delete Button and Set Button Actions #2928

DhSufi opened this issue Jun 22, 2024 · 2 comments

Comments

@DhSufi
Copy link

DhSufi commented Jun 22, 2024

Is this a feature relevant to companion itself, and not a module?

  • I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • I have searched the existing issues

Describe the feature

API request to create or remove a button and API request to set Buttons Actions

For example: cerate a button in page 1, column 1, row 1, Set to that button
Action -> Internal: System: Run shell path (local)
Inside Action -> set Path, Delay, timeout, etc.

Usecases

In unpredictable enviroments, like videogames production, usually there are some elements on screen that must be controlled, but those elements could be obtained or lost during gameplay. It would be nice to be able to create or delete a button that corresponds to that element and set actions to that button.

For example there is three elements available for player1 and seven elements avilable for player2 in turn one. So through videogame API those elements are created in OBS Studio as sources (using OBS Studio websocket)
Each one of those OBS sources are assigned to 3 buttons in Companion. One button that performs intro and outro animations other button that make it blink or shine, and other button that make it change source image.
Each Companion button runs a script that triggers those actions in OBS Studio. (Companion Buttons performs the action Internal: System: Run shell path)
As long as gameplay advances the number of avilable items for each players changes.

Currently, in Companion I am creating manually pages for each player with buttons and setting them to run a script. This can lead to undesired errors if pressing a button for an element that does not exist anymore or run out of buttons if elements exceed the number of manually pre-configured buttons in Companion.

It would be very helpful if buttons in Companion could be created or removed through API requests and also if each button could be configured throud API requests.

@thedist
Copy link
Member

thedist commented Jun 22, 2024

Have you considered making a custom module for your game, as from what you've described it sounds like all of this is entirely possible if you made a module for your specific use case.

@dnmeid
Copy link
Member

dnmeid commented Jun 22, 2024

This is kinda duplicate of #2233 with the only difference that you are asking for an API access, where #2233 wants to expose this functionality with actions (which can be put on butttons and they can be triggered with the API).
Generally there are strong reservations against this idea.

@dnmeid dnmeid closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants