HISE Logo Forum
    • Categories
    • Register
    • Login

    How to make dynamic expansion Artwork accessible for Webview?

    Scheduled Pinned Locked Moved Solved General Questions
    29 Posts 6 Posters 2.6k 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.
    • StraticahS
      Straticah @d.healey
      last edited by

      @d-healey this would be inside the VST which is not possible since its compiled.

      = any other place would be outside of root.

      creating user interfaces: www.vst-design.com
      founder @prototype.audio https://www.prototype.audio/

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

        @Straticah Aha I get it. What about pulling from a server?

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        StraticahS 1 Reply Last reply Reply Quote 0
        • StraticahS
          Straticah @d.healey
          last edited by Straticah

          @d-healey I guess that is what i am going for if local url with a Base64 string fails.
          I just thought there has to be an easier solution if i can send so much stuff via API already.

          Also i have no test so far if web based hosting in VST plugins is cached reliably, but will explore :)

          creating user interfaces: www.vst-design.com
          founder @prototype.audio https://www.prototype.audio/

          1 Reply Last reply Reply Quote 0
          • Oli UllmannO
            Oli Ullmann @Straticah
            last edited by

            @Straticah
            I can't help you with your problem but your browser looks great! 😊

            StraticahS 1 Reply Last reply Reply Quote 1
            • StraticahS
              Straticah @Oli Ullmann
              last edited by

              @Oli-Ullmann 🙌

              creating user interfaces: www.vst-design.com
              founder @prototype.audio https://www.prototype.audio/

              HISEnbergH 1 Reply Last reply Reply Quote 1
              • HISEnbergH
                HISEnberg @Straticah
                last edited by

                @Straticah You've certainly peaked my interest with a webview based preset browser, so I'll test some things out and let you know if I find a solution to the image distribution issue. 😉

                Screenshot 2025-09-14 091356.png

                StraticahS 1 Reply Last reply Reply Quote 1
                • StraticahS
                  Straticah @HISEnberg
                  last edited by

                  @HISEnberg currently i load via url which i try to integrate into expansion_info.xml without breaking it and bypassing any caching errors (that i currently experience in build).

                  https://prototype-audio-public.s3.eu-west-1.amazonaws.com/Expansions/Immersive/artwork.png
                  

                  But @oskarsh suggested shipping base64 encoded artworks in expansion instead.

                  creating user interfaces: www.vst-design.com
                  founder @prototype.audio https://www.prototype.audio/

                  Christoph HartC 1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @Straticah
                    last edited by

                    @Straticah there's actually a system built into the webview wrapper that allows you to create virtual assets from the embedded images in a plugin - this is a very common use case so you shouldn't have to hack around loading images from a server every time.

                    It's been a while that I've implemented it so I have to look into it again, but it should be possible to reference image data using the normal HISE expansion wildcards in your HTML:

                    <img src="{EXP::MyExpansion}thumbnail.png">
                    

                    I haven't tested this with expansions though, but I can take a look how to make it work.

                    StraticahS 2 Replies Last reply Reply Quote 5
                    • StraticahS
                      Straticah @Christoph Hart
                      last edited by

                      @Christoph-Hart oh this would be very helpful?! :)

                      creating user interfaces: www.vst-design.com
                      founder @prototype.audio https://www.prototype.audio/

                      1 Reply Last reply Reply Quote 0
                      • StraticahS
                        Straticah @Christoph Hart
                        last edited by

                        @Christoph-Hart I was not able to get it to work with my Expansions so far. If you have an example or rough script this would be very helpful :)

                        creating user interfaces: www.vst-design.com
                        founder @prototype.audio https://www.prototype.audio/

                        Christoph HartC 1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart @Straticah
                          last edited by

                          @Straticah yeah, I haven't implemented it yet, but it was pretty simple to add:

                          const var WebView1 = Content.getComponent("WebView1");
                          WebView1.set("x", 0);
                          WebView1.set("y", 0);
                          WebView1.set("width", 600);
                          WebView1.set("height", 600);
                          
                          WebView1.setHtmlContent("
                          <style>
                          body { background: #888; }
                          </style>
                          <p>Hallo</p>
                          <img src=\"{EXP::noicenoicenoice}hise.png\"/>
                          ");
                          

                          Compile the latest commit, create an expansion called noicenoicenoice and slap the hise logo in there, then load this script and it should display the image. I haven't tested it in a compiled plugin but since it uses the default HISE image loading mechanism this should work without issues. Let me know if there are any hiccups / problems.

                          Christoph HartC StraticahS 2 Replies Last reply Reply Quote 1
                          • Christoph HartC
                            Christoph Hart @Christoph Hart
                            last edited by

                            @Christoph-Hart oh and it needs to be a PNG file because the webview can only load those.

                            StraticahS 1 Reply Last reply Reply Quote 0
                            • StraticahS
                              Straticah @Christoph Hart
                              last edited by

                              @Christoph-Hart works thank you very much this saved on a lot of time and potential bugs.

                              165cb42f-f7ec-4c41-a0da-5b8380cba220-image.png

                              creating user interfaces: www.vst-design.com
                              founder @prototype.audio https://www.prototype.audio/

                              1 Reply Last reply Reply Quote 3
                              • StraticahS Straticah has marked this topic as solved
                              • StraticahS
                                Straticah @Christoph Hart
                                last edited by Straticah

                                @Christoph-Hart

                                Let me know if there are any hiccups / problems.

                                prototype_sampler_04:! WebView Resource for /%7BEXP::Hardware%20Lab%7Dartwork.png not found
                                prototype_sampler_04:! WebView Resource for /%7BEXP::Pro%20Essentials%7Dartwork.png not found
                                

                                Mac works just fine as you have seen.
                                Win works fine if expansion name has no spaces like "Immersive".

                                I have some problems on windows encoding url from expansions with a separator.

                                creating user interfaces: www.vst-design.com
                                founder @prototype.audio https://www.prototype.audio/

                                Christoph HartC 1 Reply Last reply Reply Quote 0
                                • Christoph HartC
                                  Christoph Hart @Straticah
                                  last edited by

                                  @Straticah said in How to make dynamic expansion Artwork accessible for Webview?:

                                  %20

                                  ah yes, somehow the illegal URL characters are not converted properly - I half-assed it myself to convert the {} brackets of the wildcard, but I guess I have to look up exactly which characters are supposed to be encoded and reverse that process before checking the reference string in HISE.

                                  I will so use ChatGPT for that lol...

                                  StraticahS 2 Replies Last reply Reply Quote 2
                                  • StraticahS
                                    Straticah @Christoph Hart
                                    last edited by

                                    @Christoph-Hart Thats the way to go! I used Cursor for the webview.

                                    creating user interfaces: www.vst-design.com
                                    founder @prototype.audio https://www.prototype.audio/

                                    1 Reply Last reply Reply Quote 0
                                    • StraticahS
                                      Straticah @Christoph Hart
                                      last edited by Straticah

                                      @Christoph-Hart How can i get the expansion_info.xml content into webview?
                                      I would like to populate it with tags and a description - that then goes into the info panel.

                                      Does the wildcard reference work?

                                      1892f532-dee5-4b13-81e9-7e29727f6a66-image.png

                                      creating user interfaces: www.vst-design.com
                                      founder @prototype.audio https://www.prototype.audio/

                                      bendursoB 1 Reply Last reply Reply Quote 0
                                      • bendursoB
                                        bendurso @Straticah
                                        last edited by

                                        @Straticah To get the Tags text you can use

                                        ExpansionHandler.getCurrentExpansion().getProperties().Tags
                                        

                                        Supposing that is for the current expansion getCurrentExpansion(), but you could use any expansion.

                                        It doesn't contain a description field in the expansion_info.xml.

                                        StraticahS 1 Reply Last reply Reply Quote 1
                                        • StraticahS
                                          Straticah @bendurso
                                          last edited by

                                          @bendurso ah thats a good starting point, maybe i put everything into tags and try try to format it if possible.

                                          creating user interfaces: www.vst-design.com
                                          founder @prototype.audio https://www.prototype.audio/

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

                                          15

                                          Online

                                          2.0k

                                          Users

                                          12.7k

                                          Topics

                                          109.9k

                                          Posts