Embedding web-app inside JUCE plugin possible?

Hi guys!

I have a question regarding the possibilities of JUCE I hope some awesome mind on this forum can help with.

I have a web-app coded in PHP (Laravel), is it possible to embed this web-app inside a JUCE plugin so the plugin will have the access to the underlying API’s that JUCE expose and be able to communicate with the web-app?

I’ve seen a plugin before that looked like it was just a wrapper around a web-app with some hooks to the underlying JUCE API. Is this possible to do? Is there anything I should be aware of and is this a major development task?

Thank you

The closest thing you’ll get with JUCE is having your web-app accessible via the juce::WebBrowserComponent (so, loaded as a locally hosted website), though you won’t be able to interact with anything from C++ land.

What platforms do you want to support? You can’t count on Windows having PHP installed, and macOS will have various versions installed. So it probably means you’d need to build PHP yourself and then bundle it with your app. PHP does come with a built in webserver, so you could you that. But it’s only single threaded, so that might be an issue. Or you could build in the Civet webserver and then call out to PHP via cgi.

However you handle it, getting PHP and a webserver built into and bundle with your plugin is going to be a pretty major task.

Output plugins do something like this see https://youtu.be/XvsCaQd2VFE
But I think there’s no “in process” communication between web app and juce.
Web app part is for browsing sounds and I think the juce part relies on some file system watching + file metadata.

Last time I did something like that, we ended up defining our own subset of the markup language, render it in Juce, and communicate with a web service. You really don’t want the memory footprint of a full browser inside a plugin.

Thanks for replying! That seems less than optimal, we need to interact with the underlying APIs.

That looks very interesting! Will definitely watch the full video :slight_smile:

Thanks!

Hmm okay, interesting, not sure that is the way to go for us though necessarily :confused: