New modder here, been messing with UI mods the past couple days (and been sharing progress on the Discord server) I've got a few questions: 1. How do I package my app in /ui/modules/apps into a .zip that I can distribute/put on the repository? 2. I was messing with the HTML <audio> element earlier to try make a radio player (that uses an external audio stream/internet radio). However I get the following error if I try play it: BEAMNGCEF::BNGCefClient::OnBeforeResourceLoad Ressource cancel URL:=https://radio.truckers.fm/ - Can I somehow request permission to use external audio? 3. Can I also make keybinds for my UI app so I can bind keys to certain functions? I have tried adding an event listener for keydown/keypress but nothing ever comes through. Thanks in advance
Hey there, 1. You want the zip file structure to look like this: 2. I don't believe CEF (Chrome Embedded Framework) allows the loading of external resources directly. But somehow another modder was able to embed the YouTube player into a UI app. (maybe its possible to work around it but idk) https://www.beamng.com/resources/youtube-player.14769/ 3. Maybe the UI element isn't being focussed or something?
Thanks for the reply If I wanted to upload my mod to the repository for example, would I enter it's details then or would it use the app.json information? Thanks for the link to the YT player, I'll take a peek through and see if there's any fancy way it's being done there. And also, the YT player's comments gave me the answer to the last: hold right click and it gets focus so that helps with input a lot.
No you'll need to enter the details manually when uploading it. And its good to know that you figured that other part out