Webview Doesn't Work on Compiled Plugin in Windows
-
On Mac, it works fine in HISE and in the compiled plugin too.
In Windows, it works in HISE but not in the compiled plugin.
I have enableCache enabled and then applied the reset as I saw in other posts.I'm using the same commit on Windows and Mac (last week commit Sep 9, 2025)
I'm rendering a page of my website like in this example https://forum.hise.audio/topic/9159/webview-doesn-t-work-in-compiled-plugins-and-stand-alone-apps/5
-
@bendurso does it work with the Webview examples from Christoph?
GitHub - christophhart/hise_tutorial: The Tutorial project for HISE
The Tutorial project for HISE. Contribute to christophhart/hise_tutorial development by creating an account on GitHub.
GitHub (github.com)
I think the browser example in „HISE Tutorials“ is best to test this with.
-
@Straticah Thanks, made the test and got the same issue, works on HISE, not in compiled plugin
-
@bendurso hm the browser example works on my end for both win and mac.
development build from yesterday.
Red part is Webview
Make sure you have:
wv.set("enableCache", true); wv.set("enablePersistence", true);
-
@Straticah Yep, I have these settings enabled. Another setting of the plugin that may be related?
-
@bendurso Not that i am aware of i guess you have vst3 support enabled already.
-
@Straticah I noticed that the ‘PlayCanvas’ example had caching disabled. I changed it to enabled, and it works now in the compiled version.
In my project, I had caching and persistence enabled, so there must be another reason why it doesn’t work. But at least now I know it’s supposed to work. Thanks :)
-
@bendurso if you‘re loading an external website you should not use any of those flags, there‘s nothing to cache or be persistent.
-
@Christoph-Hart Thanks, I tried with and without cache/persistence, but it still doesn’t work.
But.. I tested the same script along with the same HTML file in a new project, and it works. There must be something in my project that’s preventing the page from rendering. I used the same project settings.
It actually doesnt even load the html in the original project, because I have a spinner while the page is loading. And I don't even see the spinner.
-
Yeah I found the issue.. for some reason in the compiled plugin it doesn't find the html file. I checked it with File.isFile() and only founds it on Hise.
I have the setting "Embed Images Files" enabled. I tried also disabling this and putting the ImageResources.dat into the appdata folder, but same issue.
This is how I'm getting the file:
const var webroot = FileSystem.getFolder(FileSystem.AudioFiles).getParentDirectory().getChildFile("Images/news"); WebView1.setIndexFile(webroot.getChildFile("file.html"));
The weird thing is that.. in a new project it works. But on my existing project it doesn't. Any ideas on what else could be blocking the file?
-
@bendurso said in Webview Doesn't Work on Compiled Plugin in Windows:
const var webroot = FileSystem.getFolder(FileSystem.AudioFiles).getParentDirectory()
This will return the app data folder in the compiled plugin.
-
@d-healey yeah I know. If I embed the Image Files will be into the plugin itself. But the issue is not here because I'm being able to make it work in a new small project with the same script and html (in the compiled plugin).