Bridge API¶
The frontend communicates with JUCE by navigating to a custom URL scheme handled inside WebUIComponent::pageAboutToLoad().
URL Format¶
myapp://<action>?key=value&key=value
JUCE intercepts the navigation, parses the query string, dispatches the action, and cancels the browser navigation so the page remains loaded.
Current Actions¶
setVolume¶
window.location = 'myapp://setVolume?value=0.75';
- Expected range:
0.0to1.0 - Invalid values are ignored
play¶
window.location = 'myapp://play';
stop¶
window.location = 'myapp://stop';
Adding a New Action¶
- Trigger a new
myapp://...URL from the frontend. - Add a new action branch in
WebUIComponent::handleBridgeAction(). - Parse any expected query parameters from the
juce::StringPairArray. - Forward the action to the relevant JUCE subsystem.