HTML-based sound scripts not working properly after update

Hello,

I apologize if this has been addressed before, I’m not sure what the proper terminology for this sort of thing is.

Recently I haven’t been able to play sounds using a script very similar to this one: [Release] Play Custom Sounds for Interactions

Most of the time, when I try to have the sounds played (namely long ones), I get this error:


and in this event, I have to play the sound twice to hear it. This is usually an error I get if the sound files aren’t present in the resource. I assure you, they are.

Neither the code or the sound files themselves have been changed in months, so I’m just wondering if there’s an issue with the NUI functions after a recent update. Any insight would be appreciated.

Thanks,

  • M

EDIT: I believe may be related to this thread [Release] [JS] Radio

EDIT2: This is new…
image

What codec are these files?

.ogg vorbis

I forgot to mention, I noticed that media keys are now enabled for the FiveM GTAprocess.exe

This has never popped up before.

image

The sounds haven’t changed, and they were working for a long time. I don’t think the codec is the problem, since starting today, sometimes the sounds work and sometimes they don’t.

I can concur that NUI based sounds have stopped working. Our server uses a few sounds for a couple scripts that use .mp3 files and they no longer work. Our loading screen uses NUI and an .mp4 video is no longer working. All of our NUI scripts that use custom sounds, etc. have stopped working.

1 Like

Correct, these were never meant to work in the first place: them ‘working’ is a bug.

… with an ancient build of libvorbis writing them.

Download a normal open-source build of Chromium and see if your files play there: if they don’t, that’s why.

Can you explain what you mean by “normal” i downloaded chromium latest build and it plays my ogg files and mp3 ones as well.

As in - not having additional proprietary codec support enabled.

ol i apology for bothering you, but could you say what should i use to convert files? i tried with plugin for media encoder, ogg vorbis version 0.5b6 2016 build but that doesnt seem to work

Thanks, I will test and convert the few files we have over to .ogg.

Hello! Any success?
I tried a lot of codecs and sw, but no success. :frowning:

just thought I should pass on some info that I’ve discovered while trying to fix the NUI audio issue for the server i help with:

It appears to NOT be related to codecs. It appears that the version of the chromium DLL that is shipped with fivem is more picky about server headers, and is refusing to play audio offered by the http server built into fivem. We’ve offloaded the mp3, mp4, ogv, ogg audio+video files onto our community’s web server, and modified the scripts to load from the apache-based web server, and audio works again, pointing to an incompatibility between the http service from fivem itself.

Already fixed a while ago on the canary branch:

Awesomeness! Thanks for the info, and the quick fix. Any estimated ETA when this will get pushed to the recommended artifact line?

It’s a client change, server artifacts aren’t related; but it’s somewhat dependent on a number of compatibility workarounds for common resources such as ‘gcphone’ and testing on some ‘weird’ PC setups.

that’s honestly a bit unexpected to me, that it’s being fixed on the client side rather than on the server-side, which generates the http server the files are hosted from. So it’s intercepting the calls from the server, injecting the mimetype header, before passing it on to the chromium component? I can see how that workflow would work to ensure that all game clients would be able to work without folks having to update their artifact, but it seems like it has a LOT of potential for edge cases like you mentioned…

15 years of web server administration may be biasing me, but I’d highly recommend considering updating the artifacts to also provide the mimetypes correctly to reduce complexity in the future

Uh?

Resource files are downloaded locally on join (the ‘Downloading content…’ phase) and handled by a custom scheme handler. There’s no HTTP server involved here at all other than the CEF scheme handler-based HTTP semantics emulation.

3 Likes

Ahhh, I am enlightened. I didn’t realize that the client simulated a http server for displaying the resources. Thanks for taking the time to correct me :slight_smile:

1 Like