Playing audio via URL in different rooms #1630
Replies: 2 comments
|
Hello. The short answer: Should be fine either way. I've never heard that having audio files included in our .quest game file effected the load time. If Quest loads audio files before the game starts, I've never seen that code. (I am far from an expert, though, so, I may be wrong about that. I think when Alex first updated the online player to Quest Viva, the beta version had to import the entire .quest file into a Docker container before starting the player, but it doesn't do any of that anymore, I don't think. Even then, it was only maybe one second, maybe two seconds on rainy days.😁) To my knowledge, Quest only loads a sound when the sound is played. (We can watch this happen in real time with the dev tools open in our browser while playing). I've never noticed any lag when loading a sound that is included with the game file. However, if using sound files from an external site, I can see how an external site hosting the audio might be slow enough to cause this. Also, the last time I was messing with sound in Quest games, the MP3 format wouldn't work from an HTML audio element in the default iPhone browser. Not sure if this is still a thing, as that was a few years ago. At any rate, MP3 (or WAV) will work in all browsers when using the Quest Note We cannot control the volume, fade in or out, or pause/resume sound when using Quest's script instead of using our own HTML audio element, but we can have each sound optionally pause game play until the sound finishes. And, of course, with the Quest script, we will know MP3 or WAV will work in any browser, and that our sound files will always exist alongside our game file. Another thing concerning the use of external sounds is the TextAdventures site's maximum upload size. It was 25mb for years, but Alex recently (very recently) bumped that to 50mb. So, now it will allow more than a handful of MP3s. Note Even when we have our sound files included in our .quest file, the online player is still technically loading them from an external site, but the site belongs to the same person hosting the Quest game. Never any worry about security policy changes or anything like that this way. I was once a proponent of external sound files and the use of HTML audio elements in a Quest game. Here is a library I retired upon the release of Quest 5.9: https://github.com/KVonGit/quest5-stuff/blob/fcf4760f53081cd1aa6eaadd7e375ef630ae3ff8/libraries/AudioVideoLib.aslx After the update to Quest 5.9, and the switch to the new Quest Viva online player, I didn't see any good reason to update that library to work with the 5.9 editor. After years of updates across all the different browsers between 5.8 and 5.9, it was too much trouble to try to handle the differences between each browser, and Quest's Sorry this is so long! Sound is one of my rabbit holes. Docs |
|
Thank you so much. I realised I am still using 5.8 so might update to 5.9. I am going to have 10 audio tracks so good to know that tracks load only when used. Also, good to know regarding 50mb. Thanks again |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I am building a Quest game with different audio in each room.
I have built a few simple games in Quest. I am also aware that embedding multiple audio files causes the game to take a long time to load, e.g. the game loads all the audio files before the gamer starts.
I am wanting different music (mp3 files) in each different room entered and then switch off in next room. I think the best solution is to host the audio files online (probably github) and play as each room is entered.
I just wanted to check this is the best solution and will load the game much faster.
All reactions