Solved Some questions about UI mods

Discussion in 'Mod Support' started by ThatTonybo, Apr 12, 2022.

  1. ThatTonybo

    ThatTonybo
    Expand Collapse

    Joined:
    Jan 2, 2022
    Messages:
    28
    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 :)
     
  2. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    540
    Hey there,

    1. You want the zip file structure to look like this:
    a.png

    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. :confused: (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?
     
  3. ThatTonybo

    ThatTonybo
    Expand Collapse

    Joined:
    Jan 2, 2022
    Messages:
    28
    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.
     
    • Like Like x 1
  4. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    540
    No you'll need to enter the details manually when uploading it. And its good to know that you figured that other part out :)
     
    • Like Like x 1
  5. ThatTonybo

    ThatTonybo
    Expand Collapse

    Joined:
    Jan 2, 2022
    Messages:
    28
    Great, thanks for the info :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice