+ 5

(p5js question) How do you reference a p5 library such as p5.SoundFile in SoloLearn

I want to play music behind my JavaScript Arcade Game. If you check out the code for that game, you'll see that I tried to play a song from my phone in the program. Am I not referencing the library correctly? Also, how do I play a song in it from my phone or use a font that I downloaded to my phone? If it's on SoloLearn, do I need to pull the sound from a website or cloud or something? Please help!!

12th Mar 2017, 3:51 PM
Noah Wise
Noah Wise - avatar
2 Answers
+ 3
I know i'm late but check this out https://code.sololearn.com/WjeQS0FOy0NA/?ref=app
30th Jun 2017, 4:20 PM
seamiki
seamiki - avatar
+ 2
As far as I know you can only use files from the folder in which the HTML file is, or from websites. I'm new to this app but I don't think you can include your own resource files in the HTML file's directory, so I would upload the song to a website and see if you can load it from there. Note that in the p5 reference they only load local files, so I don't know if you can load them from another website.
29th Mar 2017, 11:07 AM
Luca Garrera