DiV Posted March 3, 2018 Share Posted March 3, 2018 What should work fine with "../" doesn't work in my case. If I put my .ogg sound effect in a folder of higher level I can't load it anymore. Trying different sound formats and styles of the relative URL didn't help. How do I solve this? I don't wanna copy the same file into every scene folder directly D: Quote Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2018 Share Posted March 5, 2018 Can you get the absolute URL instead of a relative one ? Quote Link to comment Share on other sites More sharing options...
DiV Posted March 5, 2018 Author Share Posted March 5, 2018 58 minutes ago, Deltakosh said: Can you get the absolute URL instead of a relative one ? I think I can, but I need it to work locally, and if I use the absolute URL sound will only play on my computer, right? Would it be safe to load the sound from base64 string? My sound effect is really short, so the code wouldn't be too long. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted March 5, 2018 Share Posted March 5, 2018 Referencing Textures when the url is file:// does not work the same way across browsers. Sounds are probably the same. Edge seems to be the most permissive. I have a utility scene where you can load or record sounds from mic, then save to file. If you pick .ts or .js format it will encode it as a BABYLON.Sound object (internally as a WebAudio channel buffer). To keep the code smallest, you would need to have the QI extension, but I guess you could just copy the needed function. The point is I am already do it, so yes embedded works. DiV 1 Quote Link to comment Share on other sites More sharing options...
DiV Posted March 5, 2018 Author Share Posted March 5, 2018 I see. Then I'll stick to embedded SFX, thank you! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2018 Share Posted March 6, 2018 something like /toto/texture.jpg should work Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.