Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10016

pause event doesn't fire when currently executing javascript takes a "long" time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.3.3
    • None
    • cordova-android
    • None
    • Android Lollipop on Nexus 7
      Android Marshmallow on Nexus 5

    Description

      By "long" time I mean about 30ms! When using Cordova to run a html/javascript game the pause event fails to fire in the javascript event listener when the framerate drops below approx 35 fps. This is simply down to the time it takes to render a number of images to a canvas element. Above this it fires as expected.

      This issue means I am unable to pause music and timers meaning the game keeps running and music keeps playing when the user navigates away.

      I can reliably recreate this in a cut down example. I have posted the code as a question on stackoverflow here :
      http://stackoverflow.com/questions/33463643/cordova-pause-event-on-android-fires-on-resume-when-under-load

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            brianhearn Brian Hearn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: