Jump to content

PIXI loading audio files in iOs Safari


Recommended Posts

Hi guys!

New with PIXI and have some troubles with loading audio with PIXI.loader.

startButton.on("pointerdown", function(){
espButton.on("pointerdown", function(){

function changeLanguage(lang){
            if( lang == 'esp'){
                sound.add('sceneLogo', './objects/mp3/esp/1.mp3')
                .add('scenePlay', './objects/mp3/esp/2.mp3')
                .add('sceneBalance', './objects/mp3/esp/3.mp3')
                .add('sceneHello', './objects/mp3/esp/4.mp3')
                .add('sceneInteractive', './objects/mp3/esp/5.mp3')
                .add('sceneAirport', './objects/mp3/esp/6.mp3')
                .add('sceneDownload', './objects/mp3/esp/7.mp3')
                .add('sceneData', './objects/mp3/esp/8.mp3')
                .add('scenePerson', './objects/mp3/esp/9.mp3')
                .add('sceneFinal', './objects/mp3/esp/10.mp3')
            else if(lang == 'eng'){
                sound.add('sceneLogo', './objects/mp3/eng/1.mp3')
                .add('scenePlay', './objects/mp3/eng/2.mp3')
                .add('sceneBalance', './objects/mp3/eng/3.mp3')
                .add('sceneHello', './objects/mp3/eng/4.mp3')
                .add('sceneInteractive', './objects/mp3/eng/5.mp3')
                .add('sceneAirport', './objects/mp3/eng/6.mp3')
                .add('sceneDownload', './objects/mp3/eng/7.mp3')
                .add('sceneData', './objects/mp3/eng/8.mp3')
                .add('scenePerson', './objects/mp3/eng/9.mp3')
                .add('sceneFinal', './objects/mp3/eng/10.mp3')


Works perfect everywhere, except iOs Safari browser. Loading time from 300 ms on desktop Chrome to 1600 ms on old Droid phone (Chrome and Default browser). But mobile Safari loading time is awfull - 35000 ms.

Tried to load files separatelly, one by one before using them (don't need them all at once). And still works everywhere except mobile Safari - in this case files didn't load at all.

Don't know what I'm doing wrong. But I really tired in this war against Apple gadgets.

Thank you!


P.S. : iOs versions 10.1.x and 12.1.x

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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