mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
wsevents: fix SourceMuteStateChange
This commit is contained in:
parent
2c94b4c332
commit
e86d1aad02
@ -873,7 +873,7 @@ void WSEvents::OnSourceVolumeChange(void* param, calldata_t* data) {
|
|||||||
* A source has been muted or unmuted.
|
* A source has been muted or unmuted.
|
||||||
*
|
*
|
||||||
* @return {String} `sourceName` Source name
|
* @return {String} `sourceName` Source name
|
||||||
* @return {boolean} `mute` Mute status of the source
|
* @return {boolean} `muted` Mute status of the source
|
||||||
*
|
*
|
||||||
* @api events
|
* @api events
|
||||||
* @name SourceMuteStateChanged
|
* @name SourceMuteStateChanged
|
||||||
@ -888,14 +888,14 @@ void WSEvents::OnSourceMuteStateChange(void* param, calldata_t* data) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mute = false;
|
bool muted = false;
|
||||||
if (!calldata_get_bool(data, "mute", &mute)) {
|
if (!calldata_get_bool(data, "muted", &muted)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
OBSDataAutoRelease fields = obs_data_create();
|
OBSDataAutoRelease fields = obs_data_create();
|
||||||
obs_data_set_string(fields, "sourceName", obs_source_get_name(source));
|
obs_data_set_string(fields, "sourceName", obs_source_get_name(source));
|
||||||
obs_data_set_bool(fields, "mute", mute);
|
obs_data_set_bool(fields, "muted", muted);
|
||||||
self->broadcastUpdate("SourceMuteStateChanged", fields);
|
self->broadcastUpdate("SourceMuteStateChanged", fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user