Webview cant find index file.....Help please.
-
Ok, so im having a go at this webview thing but I cant seem to get this to find the index file. Does this look like im doing it right?

const var WebView1 = Content.getComponent("WebView1"); // Get the Images folder in a way HISE understands //var imgFolder = FileSystem.getFolder(var locationType) // Get your index.html inside Images/untitled/ var indexFile = FileSystem.fromAbsolutePath("{PROJECT_FOLDER}/Images/untitled/index.html"); WebView1.setIndexFile(indexFile);HiseSnippet 888.3ocsUssaaiCDkzIpXi5dq.aemHO4rnHVNNIaJJJZa7kVuaShQT1r8s.ZJpHhPQZHR0Tgh9UtuueC8Oncnj7slfzVCrx.FZtwynYNyvQYZF2XzYHr+YES3H7O5EVnrIcSnBEZXOD9m8NhZr7LRkpCKlPMFdDBiW6kNE3MVGU97wmcHURUL9bUHz4ZAi+ZQpvNW6nm+WBob.MhelHcAu284CYZUWsTmC4yZdAnIT1UzK4GSct0vC8JpIAg+cuc1IlcPPvAc5rW.k1IhR2sMuyi4w6Gy1K3wAQi2K.9sOBeu9QBqNKzRsbCbnGpiJBSzWqp.3bgQLVxcBsQg.xUpQcSDxnQSKNFDBu9n4kp0pJU+l2QhHwL8yKY+ZoAx7HVrngabWoT6uiTBuPJsdUJ8.uPVlXhctEW9beugJnCFSgdyhoRkunFOrgWWM3gxtcJ8J9fLPXVDM2OH3QD3usdhuuOzfLVxaoYj+gO9bA+51jmRlF7kbaWc5DsBDZt4TG1zEXqVjWxsDaBmLLEZoFRrVFArJghPIWSKHuZXXeRtBzYrTUjABwAiH8xAUd9Tx.gjGV.jwTGTUpa5bRpYTqPqbEgslAVAvifyOh+tsSroR3UiHZJ9sxUVgUxiZ4WBiyM24uLLwY5zWL1nk4V9HpMo4luezom7m86d1ECN4085e5GZ8kG2b.K+vmVE11vgZZMHMmA2VOINWwb4NQqNVa4mnZtk+682v+C9juzTb7sZyU9yzRITLtMytgrr6Jvlp7zw7rGAsUYNeli.oZYl5891XprJ1vBNpUCUB6IS30xkctnp2uIuFUSmf296g8nVpipWqC7aBOyJboCtG+svxkJh+Fd83lqr5Ik9VyAgu.ao0eodrntYfD.39dSaMn2gvd3+Evqv8x+Uti5FiVvPsNJWRsKOo61AVa.JpKMd4Fg.JmsXwcjeGi+A243+2ZJ9.uQBKK41ywF2RNBk6+Oxw5kl+jW+3XNyNOAW2avaV0MjeE3OUmaEpKOhZyDtl7w4ogvRAFGPWo3Riqe2vQ4pjCbxtJPHWEUJ7I3o1XamLt1X6oFQoTVl9BV0njas7OTpAxIU40Va.2eBxj1nxwqEqyovsDWvXKeT2HvcV0.6rpAt6pF3dqZf6upA9GqZfG70CzcI9Kxs5zpwFD5nQ8K2Ggw8UTfAVxVQeVTRD5a -
@Chazrox Quick thought - does it actually need the slash after
{PROJECT_FOLDER}? I thought that variable includes the slash.Have you tried no slash?
"{PROJECT_FOLDER}Images/untitled/index.html"I would imagine the parser collapses multiple slashes, but you never know.
-
@Chazrox Also, this from the docs might apply:
If you want to load images, you will most likely use files from the Images subdirectory. HISE is smart enough to assume this too. This means you can (and must) omit Images/ from the path string.
https://docs.hise.dev/working-with-hise/project-management/index.html
-
@dannytaurus I got it to load.
Im just trying to figure out how to get the button to trigger what 'Enter' with a button press for the webview. Try this snippet if you have a minute, and press 'Enter'.HiseSnippet 1449.3oc2X8taaaCDmJIpa1csqcnXXeTvX.yYHvwN+qsnXnNwItynModwtoC6KszRTVbQhTijJIFCEnOZ6QXOJ8MX6HkjsbpcVlw5v5bPBBOd+38i2c7tKoqf6RjRt.YUt+nXBx5yr6MhoBZEfoLTm8QV2xtWbHkQb5SjJzdihwRIwCYYs7SzpXUZEj4y6d7d3PLykLQDBcBm5RdFMhplHsaymRCCai8H8oQEzdqlcb4rV7PdBPmksqihwtmhGRNBqUaIaz2ikAHqu0diM7ceP85OXyM2tNFuoGFuUCxlOj3uiu610eXcuAaWG9ZGj0MNvip3hdJrhHQVqrG2aTu.94rTCbBURGDRzKZf5AVNUbadnm9JpkhZEPC85l6mjHjkc2IdskS8Z2y9PpGcr7Idu6X1vYBhhNPqklldKOE8Z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m.s5DZmWiqXj1e+5NRa70dj1m6p.y2WfYxXtbpCtGIh1GR4kEE9BILCF4WNVGMKJuEGKl4Vu6wPm3YioGVkHLoE6FwSXpoRCV9plTdtEdm9EQA8mwLpq7etwl+H3k+TS1WJmi8nQwgjCXvLCPWBCG+BnsfONITkKc5D6C4Ldb.mQcKF0OlnDzgCIhhbelWncUJXZhIRtWyigoBwEyf+5lOCx7vBvOQVPeQi+1+UNyLd8U1oz0Q+Zz4i2J1K++6J1GySzy.eHFRB0ciOJIpGTnzk.VmwHgx7NzYqqqWmVoj4YV7GvmrMajORhdyF4a9uhMhvtB9qbSGBTmm9oFIv8lY9OWTx9P8ZmYL5XDTk6UttSeTuGvMVTfatn.2ZQAt8hBbmEE38WTfO3uFntIztIJdT5SSD5vtGXlS2x5.yvvlWDn+jpUnFM -
@dannytaurus
woah. This is gonna be fun! -
C Chazrox has marked this topic as solved
-
@Chazrox Sweeeeeettt!
-
@Chazrox Nice! I've been looking into the WebView recently and I'm preparing to put it into my projects.
-
@VirtualVirgin What are you using to create your web UI? I just found Spline and it lets you create all these 2D/3D shapes and events and create variables for which we can read/write to in Hise. Interesting thing I want to learn about webview is the api's and webooks for some extracurricular activities lol Im learning about that rn, I'll post something back on this thread when I figure something out.
-
@Chazrox said in Webview cant find index file.....Help please.:
@dannytaurus I got it to load
How did you get it to load by the way?EDIT: found it in your snippet:
const var f = FileSystem.getFolder(FileSystem.AudioFiles).getParentDirectory().getChildFile("Images/untitled/index.html"); -
@dannytaurus I found the example from the tutorials and just swapped the file honestly. I had to learn how to hook up the button to trigger the animations on the webview with some help from gpt.
I found an app called Spline and it lets you make shapes and animations with variables that you can hook up to stuff. This is all brand new to me but im slowly getting it. Have you heard of Spline or do you use something equal or better?