Sound not working :(

hi all, i am a designer with limited coding skills. i built an environment with sound but it does not play when embedded on my website. sometimes it works for me on chrome and safari but i had friends test it on chrome on desktop and it did not work for them - does it work for you? it does not work on mobile either but i think that is not possible. i tried to trouble shoot it myself based on stack overflow but could not fix it. i would be so grateful for your help in fixing this.

here is the code: https://0cean.glitch.me

thank you so much!

it is working perfectly fine, i’m on chromebook

Also, welcome back to the forums!


EDIT: I had to wait about 10 seconds for the audio to play, seems like maybe you have a timeout set?

thank you! :slight_smile:

do you know where i would find/edit timeout?

in your index.js file

thank you for walking me through this - i really appreciate it!

i see t/100 at the bottom - not sure what to change this to?

Try 0.

0 will cause the app to crash, do >10

i just tried 11, any difference? no idea what any of this means lol

@RiversideRocks

Welcome to the world of web audio which is a bit annoying,
For some browser and enviorments bandwith may be limited so browsers tried to save bandwith by blocking audio playing audio. This happens almost always on mobile and depends on your settings on desktop. You can however play audio with a user gesture. A user gesture is something like the user presses a button, but I don’t think it includes keypresses. It’s actually a bit more complicated than I can describe…see the resources below.
Here are some resources you should take a look at(first one has memes :D)



and here’s where I first ran into this darn problem

and for those wondering yes this applies to video even more. YouTube in many cases has a high media score or something so it can autoplay videos.

Offtopic text:
disabling autoplay shall bring the rickrolling numbers down…but youtube.com launches mobile youtube for rickrolls anyway.

3 Likes

OpenRadio experience? :sweat_smile::crazy_face:

1 Like

that was when I was doing predecessors of OpenRadio. One of the reasons OpenRadio has infinite streams is because sometimes you can’t automatically play the next song by loading a new audio element.
i’m working on another “youtube music” application and by enslaving youtube embeds i’m sure it’ll be foolproof at least for a while

1 Like