[Release] [JS] Radio

hm… could you share what you changed, maybe the resource file?

the streams i tried are working well outside of gta… several of them…
and there is the error log i mentioned :confused:
im sure that im doing something wrong…

Just a suggestion, seeming as when i tried this and it worked, see if it works with this url as its radio station:
https://illusivetea.me/test.ogg

no… doesnt work for me… the radio shows up, but no sound is played…
thats how i filled it:

supersede_radio “RADIO_02_POP” { url = “https://illusivetea.me/test.ogg”, volume = 0.5, name = “XMasHits” }

did i do something wrong?
i still get the error message as before

Delete this:

const ToggleCustomRadioBehavior = () => {
    SetFrontendRadioActive(!isPlaying);

    if (isPlaying) {
        StartAudioScene("DLC_MPHEIST_TRANSITION_TO_APT_FADE_IN_RADIO_SCENE");
    } else {
        StopAudioScene("DLC_MPHEIST_TRANSITION_TO_APT_FADE_IN_RADIO_SCENE");
    }
};

and everyone of these lines where you can find:

ToggleCustomRadioBehavior();

And works perfectly!

OP - awesome script , thanks.

1 Like

now its just playing the normal radio i wanted to replace… but i still get the same error message and not the custom audio… =(

Yeah , my bad it was 4 am , and i thought it is working , but it was ingame radio.Sorry :smiley:

haha no problem thank you anyways :slight_smile:

Probably update broke it.

jeah maybe… im using es4, esx and newest server so thats possible
its so sad, i wanted to have an christmas radio station in addition to our snow weather and snowballs x)

How do i import an .ogg file?? i put “radioname.ogg” instead of the one in the example but no music, i also insert “radioname.ogg” in the
files {
“index.html”
“radioname.ogg”
}
but when i try to join the server it says “cannot load resource radio”
what else can i do? the ogg file works good with vlc, so it’s not the file

music kinda breaks while in game restart the radio resource and them switch radio stations

I also tried to run the resource with the example radio that were in it before, but still error :frowning:

[   1140875] nui://radio/index.html:79, Uncaught TypeError: Cannot read property 'stations' of undefined
[   1140875] 
[   1145282] nui://radio/index.html:90, Uncaught TypeError: Cannot read property 'stop' of undefined
[   1145282] 
[   1145282] nui://radio/index.html:79, Uncaught TypeError: Cannot read property 'stations' of undefined

so, new stations is just silence

1 Like

As the dev said

Erratum: this resource uses a not-meant-to-be-exposed internal API surface. Don’t blame FiveM if this resource doesn’t work anymore after an update.

how can i convert the radio to .ogg?

Go up to post 27 in this thread as its been answered

Hey is this working right for yall?

This is not working for me

Could i please get some help with this?
Using it with our Server sided mellotrainer (portable Radio), it is working. But inside cars, with Default gta5 raio, the custom stations just Play for like half a second and then it is silent.

Anyone knows how to fix it?
For now i just have the Default example stations in.

Resource updated after months of inactivity! :tada:
It’s now compatible with the latest FiveM update (as of Mar 4).

2 Likes