-
-
Notifications
You must be signed in to change notification settings - Fork 713
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
Add mute source commands #37
Add mute source commands #37
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice contribution! I had those commands in mind but didn't took time to implement them.
I reviewed your PR and added some comments about some things to change. I'll merge the PR once everything is OK.
|
||
obs_source_t* item = obs_get_source_by_name(item_name); | ||
if (!item) { | ||
owner->SendErrorResponse("invalid request parameters"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a return
instruction after calling SendErrorResponse
.
|
||
obs_source_t* item = obs_get_source_by_name(item_name); | ||
if (!item) { | ||
owner->SendErrorResponse("specified source doesn't exist"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark here as line 403.
PROTOCOL.md
Outdated
@@ -236,6 +236,20 @@ __Request fields__ : | |||
__Response__ : OK if source exists, with these additional fields : | |||
- **"name"** (string) : name of the requested source | |||
- **"volume"** (double) : volume of the requested source, on a linear scale (0.0 to 1.0) | |||
- **"muted"** (bool) : mute status of the requested source | |||
|
|||
### "SetMute" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title is one level too high. Should be #### "SetMute"
instead of ### "SetMute"
PROTOCOL.md
Outdated
- **"source"** (string) : the name of the source | ||
- **"mute"** (bool) : the desired mute status | ||
|
||
### "ToggleMute" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as line 241 : should be #### "ToggleMute
instead.
@Palakis Thanks for the review, and thanks for this great project! This project has helped the stream group I'm involved with immensely. I've addressed the items in your review. |
Looking forward to this being packaged and released. I'm having to do mouseclicks to mute right now and it is painful. Thanks guys. |
Once this nasty and tricky bug is fixed, I'll be able to package a new binary release. |
Implements ToggleMute (inverts source's mute) and SetMute (sets mute to true or false).