Jump to content

Sound: Undefined is not a function.


clark
 Share

Recommended Posts

In my game, when I emulate IOS devices my profile is this:

 

"Phaser v2.0.5 - Renderer: WebGL - Audio: WebAudio - http://phaser.io"

 

The first time I interact with my game, I get an undefined error:

 

"this._unlockSource.noteOn(0);"

 

Which is on Phaser.SoundManager.unlock()

My game does not have any sounds, I was just wondering if you had experienced this before and how you worked around it? Should I explicitly tell the SoundManager not to be used?

Cheers!

 

Clark.

 

Link to comment
Share on other sites

Chrome Canary.  But it also appears to freeze up on IOS itself (IPad 4). However, I just caught on this forum "disableVisibilityChange" and I am guessing that perhaps this is the "real" problem as both occur at the same time and it is just Canary emulation that is jacked. Checking this out now.

Link to comment
Share on other sites

The freezing occurred when the game ran in an IFrame when you first touched the device but disableVisibilityChange fixed that.   I still get an error on first touch with the sound mnager when testing any device on canary, but it does not occur on the device itself.  These past couple of weeks, canary has gained a new emulation panel so I think it is just teething issues with that. 

Cheers mate.

Link to comment
Share on other sites

  • 4 weeks later...

I am having the same issue on Chrome emulating iPhone 5. The sound or button doesn't work on the first tap. It works fine on the second tap. I get the following error. On the iphone 4 I get the event to work, but the sound only after the first tap.
 

  1. Uncaught TypeError: undefined is not a function VM58:43616
    1. Phaser.SoundManager.unlockVM58:43616
    2. Phaser.Touch.onTouchStartVM58:22184
    3. _onTouchStart
Link to comment
Share on other sites

Chrome has just unprefixed a bunch of stuff by the looks of it - I'm seeing games made with early versions of Howler.js failing all over the web now.

 

However this shouldn't happen actually on device, and if Chrome is using the unprefixed method when in emulation mode, that's pretty shitty emulation :)

 

Even so, I'll get it fixed - it's already reported on github as an issue, so no need to add again.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...