Dungeoneer
Dungeoneer copied to clipboard
[BUG] client side sound issue
Custom/default sounds can't be heared on a client side. Connecting to myself via a browser - no sounds. Also tried the phone, the same problem. Asked friend to connect - nothing. Any ideas?
@shradee are you connecting via the hosted client site (https://www.ogreforge.me/Dungeoneer/client) or simply by opening the html file? If you are not connecting to the hosted site it might be blocked by CORS (browser security thing), so you'd have to use a local web server to host the client.
I just tested the online client and the default sounds work. There's no support yet for custom sounds unfortunately.
To see if CORS is blocking it open the dev console in the client, you should see a cors error there
CORS hasn't blocked anything. Also, I am using ogreforge site
I feel like my issue is related to this one.
If you join a room with already spawned sounds everything works just fine:
Object { path: "./client/sounds/blizzard.mp3", name: "blizzard" }
with a successful load.
But attempting to add a sound while somebody is connected will generate an object with a wrong path for that client
Object { name: "slime", path: "slime.wav" }
Which results in 404 GET https://www.ogreforge.me/Dungeoneer/slime.wav
UPD: I was wrong about the cause. The only sounds that work are blizzard
and beach ocean
, while slime
and etc create an object with an incorrect path (???)
UPD2: docs/client/soundManager.client.js#L180 well this does explain something
@0x07C0 yes that is correct, seems that the soundlibrary isn't correctly defined, or half implemented in the client
This should be resolved once the client site deploys in a few mins
So it seems that there was a problem with the javascript sound library used, as sounds were not playing if they were added after client connected. But it should be fixed now. @shradee feel free to reopen if this is still a problem.