-AAG-

No sound or music on Chrome desktop (windows 10)

Recommended Posts

I was just checking on my games yesterday and realize that no sound or music is playing on Chrome for desktop. Firefox and Edge are working fine. IE never worked.

On Chrome for Android sound and music will start playing after the first user input. Firefox works just fine.

Did I miss something? Windws, Android, and browsers are all up to date.

I'm on the latest version of GameMaker: Studio 1.4 now and having this issues but the games on my catalog where made on 1.4.1763 and still the same thing.

Share this post


Link to post
Share on other sites

I have the same problem, using Construct 2.  My projects' audio worked in Chrome a few days ago, but now--nothing (unless I press F5;  then the sound returns).  I tried my games out on other peoples' computers, using Chrome, and had the same result, although all of the other browsers worked fine.  It seems something in Chrome changed during an upgrade process, perhaps.  At least two other people complained about it in the Scirra (Construct) forum.

Share this post


Link to post
Share on other sites

I think I figured it out:

https://www.theverge.com/platform/amp/2018/5/3/17251104/google-chrome-66-autoplay-sound-videos-mute

Frustrating

Share this post


Link to post
Share on other sites

Here is a a little hack that worked for me. Just ad that anywhere on your game.js. I put it on the very beginning. 

if(typeof AudioContext != "undefined" || typeof webkitAudioContext != "undefined") {

   var resumeAudio = function() {

      if(typeof g_WebAudioContext == "undefined" || g_WebAudioContext == null) return;

      if(g_WebAudioContext.state == "suspended") g_WebAudioContext.resume();

      document.removeEventListener("click", resumeAudio);

   };

   document.addEventListener("click", resumeAudio);

}

Share this post


Link to post
Share on other sites

I hit this problem as well.  I fixed it by calling resume() when the user presses a button:

audioCtx.resume();

If you look at your Chrome console, it will tell you that it created AudioContext in a suspended state, and give you instructions on how to resume it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.