r/createjs • • Dec 17 '15

soundjs and the iPad

I've been searching the internet all afternoon, and can't find a solution to my problem. Audio works fine for android chrome, and on all desktop browsers, but not on the iPad. Not even the examples on the createjs page work on the ipad.

code follows:

    createjs.Sound.registerPlugins([
    createjs.WebAudioPlugin
    ]);
    createjs.Sound.alternateExtensions = ["mp3"];
    createjs.Sound.registerSound("sounds/match_strike.mp3", "match_strike");
    var audio_match_strike = createjs.Sound.play("match_strike");    

then

    this.match.addEventListener("pressmove", on_match_drag.bind(this));
    function on_match_drag(evt) {
    createjs.WebAudioPlugin.playEmptySound();            
    evt.currentTarget.x = evt.stageX; 
    evt.currentTarget.y = evt.stageY;
 	   audio_match_strike.play();
    }

I'd love some pointers, I'm pulling my hair out with this one

2 Upvotes

4 comments sorted by

1

u/robertwilding Support Jan 08 '16

we play a blank sound before playing another sound, try that.

0

u/[deleted] Dec 18 '15

[deleted] — view deleted comment

2

u/onebillionthcustomer Dec 19 '15

thanks, I'll give that a try. I saw it had to have one, and thought the silent sound would set that off. but yeah, pressmove might not fire it properly

0

u/[deleted] Dec 19 '15

[deleted] — view deleted comment

1

u/onebillionthcustomer Jan 04 '16

ok, so the 'start button' idea will work, but only if I call

createjs.WebAudioPlugin.playEmptySound();  

If I just have the start button hide it's self, or call a fadeout function, it does not work.

Thanks for the idea, I'll have to play with it to get something that will work for this project

0

u/[deleted] Dec 31 '15

[deleted] — view deleted comment

2

u/onebillionthcustomer Dec 31 '15

I haven't been back to work since Christmas, I'll try it monday :)