| 9 | namespace fl { |
| 10 | |
| 11 | void JsonUiAudioInternal::toJson(fl::json &json) const FL_NOEXCEPT { |
| 12 | json.set("name", name()); |
| 13 | json.set("group", groupName()); |
| 14 | json.set("type", "audio"); |
| 15 | json.set("id", id()); |
| 16 | if (mUrl.isValid()) { |
| 17 | json.set("url", mUrl.string()); |
| 18 | } |
| 19 | // Audio data flows one-way (JS -> C++), never echo back to JS. |
| 20 | // Echoing would create a feedback loop of growing JSON payloads. |
| 21 | } |
| 22 | |
| 23 | void JsonUiAudioInternal::updateInternal(const fl::json &value) FL_NOEXCEPT { |
| 24 | if (value.contains("audioData")) { |