Search Issue Tracker

Fixed in 2021.1.X

Fixed in 2020.2.X, 2020.3.X

Votes

1

Found in

2018.2.0a4

2020.2.0a16

Issue ID

1276713

Regression

Yes

[WebGL] Audio is not played when in built Player

WebGL

-

How to reproduce:
1. Open the attached project Scene labeled "SampleScene"
2. Enter the Play Mode
3. Observe that the audio is played
4. Make a WebGL build
5. Host the WebGL build
6. Open the hosted WebGL Player in a browser
7. Listen for audio

Expected result: Audio is played in the built WebGL Player
Actual result: Audio is not played in the built WebGL Player

Reproducible with: 2020.2.0a16, 2020.2.0b6
Not reproducible with: 2018.4.28f1, 2019.4.12f1, 2020.1.8f1, 2020.2.0a15

Note: Doesn't work in Chrome, Firefox, or Edge

  1. Resolution Note (fix version 2021.1):

    Fixed in Unity 2021.1.0a1

  2. Resolution Note (fix version 2020.2):

    Fix for muted audio has been backported to 2020.2. Fixed in Unity 2020.2.1f1

Comments (10)

  1. peq42

    Oct 06, 2022 22:46

    Still broken on unity 2022.1.18f1

  2. rbarbosa

    Feb 16, 2022 23:38

    This is not working. Still broken (or broken again) in 2021.2.11f

  3. IamSomeone13

    Feb 03, 2022 23:04

    Unfortunately this isn't working on 2021.1 or 2021.x. I'm using the Unity DevOps Cloud Build to build the WebGL binary.

    I've sometimes had luck with 2020.1 builds.

    For compression format I'm using gzip. I've tried with Decompression Fallback on and off and Data Caching on/off.

    Additionally for the .data.gz, .framework.js.gz files I've been setting their Content-Types to application/octet-stream and Content-Encoding to gzip.

    As for when I have Decompression fallback on, I've been setting the .unityweb files I've been setting their Content-Types to application/octet-stream and Content-Encoding to gzip.

    I've been using AWS CloudFront and an S3 bucket for hosting.

    Still, sound will not work. Any suggestions?

  4. parnesen-altvr

    Sep 03, 2021 20:17

    Worse than that, any call to play a sound seems to halt the app. 2020.3.9f1

  5. Planet11

    Jul 03, 2021 12:54

    This is NOT fixed in 2020.2.x

  6. iitiaralunaii

    Mar 16, 2021 05:38

    And I searched and converted for hours. Always the same nope not the right format :.I

  7. Shaolin-Dave

    Mar 13, 2021 15:56

    I don't know why it says "Fixed in 2020.2", it isn't. Bug is still in all 2020.2 versions, and confirmed it's also in 2020.3

    However it DOES appear to be fixed in 2021.1, if you download the beta and use it to build, sound works fine.

  8. GrayRabbitGames

    Jan 30, 2021 01:44

    I thought I was losing my mind - I couldn't find any info anywhere online about audio not working on Unity WebGL. I was trying to load the audio half a dozen different ways, playing with audio and build settings... insane.

  9. FoxWareFX

    Dec 24, 2020 09:58

    I'm using 2020.2f1 and still audio not plays? This is ridiculous!

  10. Erveon

    Dec 16, 2020 22:11

    2020.2 was released with this bug in it? That's not ok.
    WebGL is completely unusable in the latest Unity version with this bug.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.