Following on from my earlier question. How can I trigger audio snippets? Say the user clicks on a button, how can I trigger a 'k-click' sound?
audio = new Audio("pathToFile")audio.play()
question....is there a way to retrigger the audio. if i press the button twice quickly then it only plays the sound once....
it seems the only way around this is reloading the file each time? audio.load()
also wondering if I can load the audio in to a buffer on launch? sometimes the audio plays slightly after the button is clicked....
you might want to try to just bring in a 3rd party library, i.e. http://www.createjs.com/soundjs
Unfortunately I am having trouble brining in the soundjs library. I've followed the instructions in the framer docs (https://framer.com/docs/#modules.npm) and I can get it working based on the example using 'moment.
However, soundjs doesn't have a .js in it's main directory. In it's library it has a great many, but each has a name that is hyphenated or includes numbers that framer doesn't seem to like. Please see the images showing the different folder states and the different responses from framer.
N.B. In each example I am only using one of the libraries in my npm.coffee. Including soundjs in the module but not in the main code still throws errors. So I'm thinking it's something to do with the module?
Send me a simplified file and I'll help you out. :)