How to host music from another site. [SOLVED]

CodeKrafter
09 Oct 2019, 13:36

I am a big fan of having a lot of music in my games. Is there a way to add music that's hosted from another site so I don't go over the 20mb data limit?

SOLUTION: What I ended up doing was the following:
First, print a message containing:
<audio autoplay loop> <source src="https://dl.dropboxusercontent.com/s/[SHARE-LINK-ID]" type="audio/mpeg"/>
This would allow looping audio hosted from Dropbox to play in the background.
Then when you want the audio to stop or be replaced, do a javascript function containing this:
eval ("$.each($('audio'), function () { this.pause(); });")


Anonynn
10 Oct 2019, 07:13

You could always try condensing the music. :)

https://www.onlineconverter.com/compress-mp3

^ pretty reliable. I've never had problems with it.

Anonynn.


CodeCrafter
12 Oct 2019, 20:45

That doesn't answer the question. I already know I'm going to use a LOT of music. Condensing it won't be enough.


mrangel
12 Oct 2019, 21:22

A lot of sites that host music provide HTML code to use their own player widget. If that's the case, you can output the same code from within Quest.

If you're hosting on a general webhosting platform, you'd need to read up on the >audio> element.