WebView Doesn't Work in Compiled Plugins and Stand-alone Apps
-
@dxmachina @Christoph-Hart I did manage to get it working for external websites. On macOS (I don't have Windows or GNU/Linux), it works flawlessly. I'll mark as solved.
dxmachina, this goes somewhere in your script; the component is the HISE web browser.
const var web_DOCS_CoreHTML_GUI = Content.getComponent("web_DOCS_CoreHTML_GUI"); // ------------- CoreHTML Stuff // This file has the redirect to the internet. var startingPage = FileSystem.getFolder(FileSystem.AudioFiles).getParentDirectory().getChildFile("Images/html/index.html"); web_DOCS_CoreHTML_GUI.set("enableCache", true); web_DOCS_CoreHTML_GUI.reset(); web_DOCS_CoreHTML_GUI.setIndexFile(startingPage);
And then the html file, use a meta-tag to redirect:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>Plugin Build Information</title> <meta http-equiv="refresh" content="0; URL=https://www.hise.dev" /> <style> h1, h2, h3 { color: #9b64d0; } </style> </head> <body> </body> </html>
-
-
-
-
-
@clevername27 that's a cool trick, thanks!
-
@clevername27 Thank you.
Just for clarity, in case anyone else is making rookie mistakes like myself. The main issue for me (just using embedded webview) was:
WebView1.set("enableCache", false);
This had to be set to true in builds or you otherwise end up with just a blank webview in your app/plugins. To be fair, this is in the docs.
-
@dxmachina Hi, I have tried both Enable cache and Disable cache. Everytime it is ended with White.
Sometimes HISE unable to compile. I had to reload the project > Enable cache . Disable cache to get rid off the error something "external file"
-
Error. Not being compiled.
C:\Users\Rdx\Desktop\WebViewExample\Binaries\Source\Plugin.cpp(10,1): error C2039: 'externalFiles': is not a member o f 'PresetData' [C:\Users\Rudra\Desktop\WebViewExample\Binaries\Builds\VisualStudio2022\GanpatiGif_SharedCode.vcxproj] C:\Users\Rdx\Desktop\WebViewExample\Binaries\Source\PresetData.h(6,11): see declaration of 'PresetData' C:\Users\Rdx\Desktop\WebViewExample\Binaries\Source\Plugin.cpp(10,1): error C2065: 'externalFiles': undeclared identi fier [C:\Users\Rdx\Desktop\WebViewExample\Binaries\Builds\VisualStudio2022\GanpatiGif_SharedCode.vcxproj] C:\Users\Rdx\Desktop\WebViewExample\Binaries\Source\Plugin.cpp(10,1): error C2039: 'externalFilesSize': is not a memb er of 'PresetData' [C:\Users\Rdx\Desktop\WebViewExample\Binaries\Builds\VisualStudio2022\GanpatiGif_SharedCode.vcxpro j] C:\Users\Rdx\Desktop\WebViewExample\Binaries\Source\PresetData.h(6,11): see declaration of 'PresetData' C:\Users\Rdx\Desktop\WebViewExample\Binaries\Source\Plugin.cpp(10,1): error C2065: 'externalFilesSize': undeclared id entifier [C:\Users\Rdx\Desktop\WebViewExample\Binaries\Builds\VisualStudio2022\GanpatiGif_SharedCode.vcxproj]
-
@DabDab Does that mean you've solved the issue, or that you've pin-pointed it?
-
@clevername27 I am confused, when I am enabling cache false by
WebView1.set("enableCache", false);
It is being compiled but DAW not showing the plugins. Only White Canvas Webview.
And when I enable cache to true
WebView1.set("enableCache", true);
it ends up with the above error.
-
getting the same issue as @DabDab
-
-
@dxmachina Can you send me your Example Snippet ?
-
@DabDab did you ever get a resolution for this? my webview is working on one computer but not the other with seemingly the same setup. im a bit lost haha
-
@Adam_G I have updated to the latest commit where I am having same Webview White Box in Compiled plugins. Additionally there is no CSS Auto completion and suggestion. I don't know what's going on.
https://forum.hise.audio/topic/10570/css-auto-suggestion-completion-not-working-in-latest-commit-8cdac4eb