[r186.2] Audio crash on iOS-ejecta (with fix)

0 favourites
  • 3 posts
From the Asset Store
Minimalist Crash Balls is a game where the goal is to hit the ball on the portal, with 20 different levels :)
  • Problem Description

    When you minimize the C2-ejecta application and go back to it, you get a javascript error about a null context

    This change fixed it:

    in the Audio plugin:

    +++ ...\exporters\html5\plugins\audio\runtime.js
    @@ -2726,7 +2726,7 @@
                 return;
             
             // upon resume: first resume the whole context
    [ul]
    	[li]if (!s && context["resume"])[/li]
    [/ul]+        if (!s && context && context["resume"])
                 context["resume"]();
             
             var i, len;
    @@ -2734,7 +2734,7 @@
                 audioInstances[i].setSuspended(s);
             
             // after suspend: also suspend the whole context
    [ul]
    	[li]if (s && context["suspend"])[/li]
    [/ul]+        if (s && context && context["suspend"])
                 context["suspend"]();
         };[/code:lm22brj0]
    
    For some unknown reasons, context might probably be null during a few frames and then the audio kicks in back.
        
    [b]Operating System and Service Pack[/b]
    iOS 
        
    [b]Construct 2 Version ID[/b]
    r186.2
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This change was already made in r187!

  • Ah! my bad (: I didn't update 'cause in 187 there's a potential breaking change and well... I don't have time to deal with it at work =), anyway that's neat, thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)