HISE Logo Forum
    • Categories
    • Register
    • Login

    Stumped by displaying webpage in WebView

    Scheduled Pinned Locked Moved Scripting
    12 Posts 2 Posters 269 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.
    • L
      LozPetts @d.healey
      last edited by

      @d-healey Yeah I thought as much when I had to go in and start correcting syntax. I suck at HTML and it made mistakes even I could spot.

      I can't see an example that shows a redirecting to a webpage within the UI in HISE, do you know of one? I can see people have it working on the forum but explanations as to how seem thin on the ground.

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @LozPetts
        last edited by

        @LozPetts said in Stumped by displaying webpage in WebView:

        do you know of one?

        The webview doesn't work on Linux so I haven't taken much interest in it. I know some other people are using it successfully though so maybe you'll get some responses.

        In the meantime you should go through the scripting basics so you can see how dreadful that GPT output is.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        L 1 Reply Last reply Reply Quote 0
        • L
          LozPetts @d.healey
          last edited by

          @d-healey Yeah it's terrible, I just thought I'd try it, it's helped me with some CSS stuff recently and it did 'okay'

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @LozPetts
            last edited by

            @LozPetts It's pretty good with css, javascript, c++, python, etc. All the major languages, because there is loads of data that it's trained on. But that data doesn't exist for HISE and it doesn't understand HISE scripting at all. It will just return some unhinged Javascript.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            L 1 Reply Last reply Reply Quote 0
            • L
              LozPetts @d.healey
              last edited by

              @d-healey Figured as much, just thought I'd give it a go! Hopefully someone with WebView experience chimes in

              L 1 Reply Last reply Reply Quote 0
              • L
                LozPetts @LozPetts
                last edited by

                @LozPetts So I started again based on a recent thread from Clevername27 - I'm now here -

                Content.makeFrontInterface(1000, 650);
                
                const var web_DOCS_CoreHTML_GUI = Content.getComponent("web_DOCS_CoreHTML_GUI");
                
                // WebView
                
                // HTML file points redirects to internet
                var startingPage = FileSystem.getFolder(FileSystem.AudioFiles).getParentDirectory().getChildFile("Images/path-example/index.html");
                
                web_DOCS_CoreHTML_GUI.set("enableCache", true);
                web_DOCS_CoreHTML_GUI.reset();
                web_DOCS_CoreHTML_GUI.setIndexFile(startingPage);
                
                

                With the suggested HTML test file below located at the path detailed in the code above:

                <!doctype html>
                <html>
                <head>
                <meta charset="UTF-8">
                <title></title>
                <meta http-equiv="refresh" content="0; URL=https://www.ferretsfightingllamas.com" />
                </head>
                <body>
                </body>
                </html>
                

                I have no idea what Ferretsfightingllamas.com is but I'm excited to find out when this gets working haha.

                I currently get a white webview window with my HTML file displayed on a dark background.

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @LozPetts
                  last edited by

                  @LozPetts said in Stumped by displaying webpage in WebView:

                  var startingPage

                  This should probably be a const, it definitely shouldn't be a var. That whole file path seems weird, why is the html going in the project's Images folder?

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    LozPetts @d.healey
                    last edited by

                    @d-healey Because that's where they are in the example projects on GitHub, to do with making sure they get embedded correctly perhaps?

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @LozPetts
                      last edited by

                      @LozPetts said in Stumped by displaying webpage in WebView:

                      Because that's where they are in the example projects on GitHub

                      Oh, seems strange but I guess that's where they are meant to be then

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      L 1 Reply Last reply Reply Quote 0
                      • L
                        LozPetts @d.healey
                        last edited by

                        Bump - anyone with web view experience able to weigh in? I've done some more playing around and can't get any further with it.

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

                        22

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.3k

                        Posts