Search Unity

No Audio in WebGL Build

Discussion in 'Editor & General Support' started by sballew7, Oct 5, 2020.

  1. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Hey all. I'm really struggling and could use some leads. My WebGL build doesn't have any audio, but in-editor and Windows builds are fine.

    It doesn't seem to be the "audio context" permission issue I've seen referenced. I performed the workarounds required and don't see that warning in the log, but there's still no audio.

    I've tried WAV and MP3. I've tried overriding WebGL audio from Vorbis to AAC.

    Does anybody have any pointers on how to diagnose this?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The first things I'd check are, are you getting audio from the same browser on any other sites? Do you get audio when running your build on another browser? On another computer?
     
  3. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Yes, I get audio from my browser on other sites. I have tried Chrome, Edge, Firefox on Windows, and Safari on Mac. I have tried multiple computers.

    Thanks for the reply.
     
  4. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
  5. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Yes! That was it. Downgrading to 2020.1 fixed it. Thanks Schubkraft.
     
  6. GameMechanics

    GameMechanics

    Joined:
    Jul 15, 2013
    Posts:
    57
    Was this ever fixed in any way? I just did a WebGL build and it has no sound even though I am just playing short audio clips. Nothing fancy. Using 2022.3.
     
  7. GameMechanics

    GameMechanics

    Joined:
    Jul 15, 2013
    Posts:
    57
    Found it. My bad.
     
  8. martinamenegon

    martinamenegon

    Joined:
    Aug 28, 2014
    Posts:
    31
    hi! could you share how? because I am encountering a similar issue (my sounds are playing fine on desktop browsers but not on mobile browsers.. I tired with unity 2022.3.11f1).
    Anyone can point a solution or something I could try to solve the issue?
     
    Vanille987 likes this.
  9. Emilio_LC

    Emilio_LC

    Joined:
    Nov 12, 2023
    Posts:
    7
    Same, using 2022.3.13f1