Jump to content

Using sound offline with iPad


SteveB
 Share

Recommended Posts

Has anyone had any success using Phaser offline using a manifest file.

 

I've set up a manifest file to allow offline use. Works fine everywhere I've tested except on my iPad. The first time, when it downloads the files, it works fine. The second time it just stops.

 

I traced it down to the audio.

/**    * Called when a file is successfully loaded.    *    * @method Phaser.Loader#fileComplete    * @param {number} index - The index of the file in the file queue that loaded.    */    fileComplete: function (index) {...  case 'audio':                if (this.game.sound.usingWebAudio)                {                    file.data = this._xhr.response;                    this.game.cache.addSound(file.key, file.url, file.data, true, false);                    if (file.autoDecode)                    {                        var that = this;                        var key = file.key;                        this.game.cache.updateSound(key, 'isDecoding', true);                        this.game.sound.context.decodeAudioData(file.data, function (buffer) {                            if (buffer)                            {                                that.game.cache.decodedSound(key, buffer);                                that.game.sound.onSoundDecode.dispatch(key, that.game.cache.getSound(key));                            }                        });                    }

The problem is that once the files have been cached, the file.data = this._xhr.response is null and that causes a DOM exception 12 error when the sound is added.

 

 

Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...

Hi, appreciate these original posts were a while ago now - but are people still encountering the same issue?

 

I'm working on an app that only has to work offline on iPad for now, which is all good apart from the audio that just doesn't play when the app is opened from the application cache offline on the iPad. The audio files have been added to the cache.manifest and I'm not getting any errors when the page opens up - just silence!

 

7

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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