-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Sample code snippet:
sounds = [
id: 'highlight', src: 'highlight.mp3'
,
id: 'click_button', src: "click_button.mp3"
,
id: 'flip', src: "flipOutX.mp3"
,
id: 'pyro', src: 'pyro.mp3'
,
id: 'confetti', src: 'confetti.mp3'
]
createjs.Sound.registerSounds(sounds, "https://s3.amazonaws.com/mybucket/sounds/")
setTimeout ->
console.log "***************************** TRYING TO PLAY HIGHLIGHT!!!!! *************"
sound = createjs.Sound.play 'highlight'
console.dir sound
, 5000
This code works with another application that I wrote in angular. The current is using webpack with react. The canvas code using createjs works perfectly, and now I was going back to reimplement the sounds. I can see the sounds loading from the server with no error. I have a 5 second delay because I have some webspeech within this application and I wanted this to play after the webspeech in case that was interfering with the audio (or drowning it out). I also have a play attached to a button click... Neither play. output of the logs:
***************************** TRYING TO PLAY HIGHLIGHT!!!!! ************* 13:19:15.951 game_layout.js:278 WebAudioSoundInstance
I opened the object and confirmed the URL and everything looks normal. except for the "playState" field is "playFailed"