Sn00py Posted September 12, 2018 Share Posted September 12, 2018 How i am able to play a soundfile with that cef framework? 2 Solutions i testes will not work... <script> var audio = new Audio('login.mp3'); audio.play(); </script> <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> Link to comment Share on other sites More sharing options...
MrPancakers Posted September 12, 2018 Share Posted September 12, 2018 function playAudio(name, volume) { audioPlayer = new Audio("./directory/filename.ogg"); audioPlayer.volume = volume; audioPlayer.play(); } That example was posted in the discord, never tried it but it should work. You can also only use .ogg format, no other sound format will work. I know you posted this in another thread, but did you test in your own browser to see if it works? Link to comment Share on other sites More sharing options...
Sn00py Posted September 13, 2018 Author Share Posted September 13, 2018 I tested in Browser and it works, i tested in Game Client and Nothing happend. Link to comment Share on other sites More sharing options...
Sn00py Posted September 14, 2018 Author Share Posted September 14, 2018 up up up Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now