Jump to content

Custom Sound CEF 1.0.0

   (1 review)

About This File

Simple CEF to play custom mp3's in the background. The CEF autodestroys after the sound has finished to not use our beloved PC resources.

 

Copy client_packages and packages content in their respective directory, then import them.

You can put your mp3's inside client_packages/Sound/sounds/ and trigger them with their filename. Only mp3 is supported right now, although ogg works as well, it's easily exchangeable and/or extensible to allow for both.

As of right now, you can play a sound with the "/playsound NAME" command. You can use this as you want, this is only a barebones example to show how it works.

I have not experimented when it comes to max sound length / filesize. I'd like to know though :D

  • Like 3

User Feedback

Recommended Comments

I wouldn't destroy the CEF after a sound has been played, because the library you use (Howler) caches the played sounds and it would be better to load frequently used sounds only once.

Link to comment
Share on other sites

vor 13 Stunden schrieb araynimax:

I wouldn't destroy the CEF after a sound has been played, because the library you use (Howler) caches the played sounds and it would be better to load frequently used sounds only once.

That's a good shout. I've decided to destroy them to not clog up memory/CPU power as it is Chromium in the end. I'll have a look for a middle ground :D

Link to comment
Share on other sites

Hello, sorry to dig out this script, but I can't play any sound from the CEF, using Howler like your script or using native HTMLAudioElement
I've got this error with HAE
 

[0819/005447.396:ERROR:media_internals.cc(104)] Cannot get RenderProcessHost

And with Howler, i've got this one

[0819/194139.892:INFO:CONSOLE(2)] "The Web Audio autoplay policy will be re-enabled in Chrome 71 (December 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu", source: https://cdnjs.cloudflare.com/ajax/libs/howler/2.1.2/howler.core.min.js (2)


The CEF built-in uses Chromium v70, how can I play a custom sound ?

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...