generativefm / generative.fm

A platform for playing generative music in the browser.
https://generative.fm
MIT License
1.59k stars 86 forks source link

Music not playing in Chrome #65

Closed arturhenryy closed 5 years ago

arturhenryy commented 5 years ago
Bildschirmfoto 2019-03-27 um 14 39 46

if i click on a piece the loading indicator keeps spinning and no sound is playing. appeared under chrome 73

arturhenryy commented 5 years ago

this usually seems like an autoplay issue, but it is weird because it also is not working once i interacted with the page with pressing play.

Update now after some time passed, few minutes i can press play and it works

alexbainter commented 5 years ago

The warnings you're seeing are probably a red herring. I also get those before I interact with the page even though the app makes no attempts to play audio until you click. I think maybe Tone.js might try to autostart the context or perhaps it's because I create and connect some volume nodes on load. I do have a click handler which properly starts the audio context and abides by the autoplay policy. Since you said the loading icon kept spinning, I'm going to guess it just took a long time to load the audio files. They aren't actually fetched until you click play, and some pieces can queue up quite a large list of them. The loading icon will spin until they're all loaded, and only then will it play audio. Do you happen to remember which piece(s) you were trying to play?

arturhenryy commented 5 years ago

yeah i think you are right here. i just added them for info. the piece i was trying to play was spring again, i checked the network tab and loading finished after 4m something and downloaded around 40mb, which sound a bit odd so this might have been due to some network issue. so if the play only starts when the fetching is done that might explain the delay. now clicking play with all the samples already in cache starts more or less instant.

alexbainter commented 5 years ago

Yeah something funky definitely happened there. I will test that one on a clean browser and see if it's reproducible or just a fluke.

alexbainter commented 5 years ago

Gonna close this as I can't reproduce. We can open it again if you have issues again.

santosh898 commented 4 years ago

Uncaught TypeError: Failed to execute 'connect' on 'AudioNode': No function was found that matched the signature provided.

On clicking Play in Chrome 78 Linux. Working in firefox though.

alexbainter commented 4 years ago

@santosh898 I wasn't able to reproduce, but I just deployed a potential fix. Try again on 1.26.1 and let me know if that solved it for you.