HISE Logo Forum
    • Categories
    • Register
    • Login

    WebView Doesn't Work in Compiled Plugins and Stand-alone Apps

    Scheduled Pinned Locked Moved Solved Bug Reports
    16 Posts 6 Posters 669 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • clevername27C
      clevername27 @Christoph Hart
      last edited by clevername27

      @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>
      
      A D 2 Replies Last reply Reply Quote 1
      • clevername27C clevername27 marked this topic as a question on
      • clevername27C clevername27 marked this topic as a regular topic on
      • clevername27C clevername27 marked this topic as a question on
      • clevername27C clevername27 has marked this topic as solved on
      • A
        aaronventure @clevername27
        last edited by

        @clevername27 that's a cool trick, thanks!

        1 Reply Last reply Reply Quote 0
        • D
          dxmachina @clevername27
          last edited by

          @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.

          DabDabD 1 Reply Last reply Reply Quote 1
          • DabDabD
            DabDab @dxmachina
            last edited by

            @dxmachina Hi, I have tried both Enable cache and Disable cache. Everytime it is ended with White.

            9a3cc1b8-dd14-4548-b485-4045386b0227-image.png

            Sometimes HISE unable to compile. I had to reload the project > Enable cache . Disable cache to get rid off the error something "external file"

            Bollywood Music Producer and Trance Producer.

            1 Reply Last reply Reply Quote 0
            • DabDabD
              DabDab
              last edited by

              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]
              

              Bollywood Music Producer and Trance Producer.

              clevername27C 1 Reply Last reply Reply Quote 0
              • clevername27C
                clevername27 @DabDab
                last edited by

                @DabDab Does that mean you've solved the issue, or that you've pin-pointed it?

                DabDabD 1 Reply Last reply Reply Quote 0
                • DabDabD
                  DabDab @clevername27
                  last edited by DabDab

                  @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.

                  Bollywood Music Producer and Trance Producer.

                  1 Reply Last reply Reply Quote 0
                  • Adam_GA
                    Adam_G
                    last edited by

                    getting the same issue as @DabDab

                    1 Reply Last reply Reply Quote 1
                    • D
                      dxmachina
                      last edited by

                      @DabDab @Adam_G

                      I have no issue compiling my plugin with webview on Mac/PC.

                      I'm wondering is this related to the specific example you're trying to compile? I have not attempted to compile the example preset browser.

                      Maybe just try a simpler test with some html/css and a binding?

                      DabDabD 1 Reply Last reply Reply Quote 0
                      • DabDabD
                        DabDab @dxmachina
                        last edited by

                        @dxmachina Can you send me your Example Snippet ?

                        Bollywood Music Producer and Trance Producer.

                        Adam_GA 1 Reply Last reply Reply Quote 0
                        • Adam_GA
                          Adam_G @DabDab
                          last edited by

                          @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

                          DabDabD 1 Reply Last reply Reply Quote 0
                          • DabDabD
                            DabDab @Adam_G
                            last edited by

                            @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

                            Bollywood Music Producer and Trance Producer.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post

                            23

                            Online

                            1.7k

                            Users

                            11.8k

                            Topics

                            103.1k

                            Posts