Sound stop playing after a short break of inactivity

  • Problem Description

    Sounds stop playing when you leave the application running without interactivity for more than a minute and a half on a mobile browser. The debug console shows the sound as playing and it never ends. Music is unaffected, only sounds are affected.

    As a result of this issue my published games (Intel SDK - Android export) seem to lose sound if the are not interacted with for more than a minute and a half.

    Attach a Capx

    https://www.dropbox.com/s/y1jq972kwcabhy2/TestApp.capx?dl=0

    Description of Capx

    This capx has a orange button, on touch, it will play a sound.

    Steps to Reproduce Bug

    • Step 1 Run capx in preview, preview on device in debug mode
    • Step 2 Touch the button, you will hear the sound
    • Step 3 Now, leave app open for more than a minute and a half or so
    • Step 4 Touch the button, no sound will be heard

    Observed Result

    Looking under the debug information under audio, you will see the debug info indicate that sound is being played, yet no sound is audible, also, the debug information for the sound played is never cleared, more pushing of the button results in debug information being appended to the debug output.

    Expected Result

    When I touch the button, I should hear the sound being played.

    Affected Browsers

    • Chrome: (YES) - This is chrome on device, doesn't seem to affect PC browsers.
    • FireFox: (N/A)
    • Internet Explorer: (N/A)

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    R216 (64 Bit)

    Observed Debug Information

    The playing sound grows longer and longer, while it appears to be playing sound, no sound is actually audible, plus the playing sound never clears and just appends.

  • I've noticed the same thing with my app.

  • Came across something similar to this.

  • This appears to be a bug in Chrome. Star this report to follow updates: https://code.google.com/p/chromium/issues/detail?id=518863

    I think I found a workaround which I've integrated in to the next build: it will play a silent sound every 25 seconds, to avoid the 30 seconds of silence detection which seems to shut down Web Audio. It seems to work here, but I'm not sure if it covers every possible case. Anyway, star the issue and hopefully Google will fix the real problem soon.

  • Great! More attention to this problem!

    Looking forward to a fix!

    By the way - the problem also appears on Android for sure and appeared on iOS several months ago.

    Never happened on PC

    Thanks all!

  • This appears to be a bug in Chrome. Star this report to follow updates: https://code.google.com/p/chromium/issues/detail?id=518863

    I think I found a workaround which I've integrated in to the next build: it will play a silent sound every 25 seconds, to avoid the 30 seconds of silence detection which seems to shut down Web Audio. It seems to work here, but I'm not sure if it covers every possible case. Anyway, star the issue and hopefully Google will fix the real problem soon.

    Thanks for the prompt fix, I will star the report.

  • Ashley

    Hi,

    this bug still persist, i have Release r224 of construct.

    workaround not work?

  • same problem here with Chrome for android 6.

  • If you look at the linked bug report, Google apparently fixed the bug for v49, which is now out. Are you sure your version of Chrome for Android is up-to-date?

    We removed the workaround from the latest betas because it caused as many problems as it solved.

  • Ok, the error seems to have disappeared with chrome for android version 49.0.2623.105

  • Ashley

    I'm using:

    construct r224,

    latest version of Intel XDK,

    Cordova version 5.1.1

    building Android with crosswalk,

    device: lenovo a316i

    Sounds not playing when you leave the application without interactivity for about minute on a mobile.

  • Ashley

    I'm using:

    construct r224,

    latest version of Intel XDK,

    Cordova version 5.1.1

    building Android with crosswalk,

    device: lenovo a316i

    Sounds not playing when you leave the application without interactivity for about minute on a mobile.

    Why not upload a test apk ?, I can test it on my device.

  • Okay, so the XDK is usually a version or two behind Chrome, so it should just get an update in a couple of months which fixes it as well. Chrome for Android should already be working.

  • I can confirm that this is still happening.

    Heard the sound stops after X time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • in my case sound is playing in browser, XDK preview, preview in wifi mobile but when i build apk then sound doesn't play on mobile ? any idea ! what may be the reason

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