WebGL not generating streaming tracks

WebGL not generating streaming tracks. Set tracks to stream and WebGL doesn’t recognize them. So when you upload on game site for html browser it uploads the game but uploads the game without music. How do I solve the problem?

pls help me

check browser console for errors (F12 key in most browsers)

Does it work correctly when you “Build and Run” from Unity, and run your WebGL project locally?

pressing F12 didn’t do anything. my unity 20203.3f1 has an audio clip array. this plays tracks out of order and repeats songs. it import songs at a larger size than their original size. it freezes the menu screen as a result for several seconds. webgl can’t handle multiple songs more than 1mb size. i’m in a pickle. pls help me

no. it doesn’t. it plays the game on a build and run but the webgl plays the game without the music cause it doesn’t recognize stream tracks. it only recognizes tracks set to decompress on load with pre load data checked. i have unity 20203.3.f1 and it has an audio clip array that plays tracks out of order and repeats songs over and over. i can’t control it. when i import songs unity imports them at a larger size than their original size. and that’s a problem cause it causes the menu screen to freeze for even longer cause webgl and pc build can’t handle multiple tracks larger than 1 mb size. and even 1 mb size tracks i do import it imports them at a larger size. i don’t know what to do. i can’t win.

jeff, the most tracks an audio clip array can handle on both webgl and pc build to not cause a menu screen of your game to freeze before you’re sent into gameplay with tracks set to decompress on load and pre audio data box checked with a check mark is 2. webgl and pc build can only handle 2 music tracks. anything more than that for tracks causes a longer freeze at your game menu screen before you are sent into gameplay.

jeff, unity imports the mp3 at a larger size than its true size and that causes problems for webgl and pc builds

original mp3 size 0.9 and imports it in as 4.1 what’s going on?

here is a screenshot to show you what i mean how unity is increasing the size of mp3 instead of decreasing size of mp3 on which it is supposed to do

pls help me jeff

Sorry not quite my area. But Googling a bit shows that WebGL doesn’t support audio compression. When we load an audio file, it may expand to the format we use internally. It looks like your option would be to make the files MUCH smaller, and perhaps use them in a play loop.

great news, jeff. by setting both pc platform and webgl platform both to the streaming all of tracks setting it fixed the freezing problem with menu screen and at the same time allowed game sites to play the game with the music too. setting both platforms to stream both pc and webgl to stream was the answer! thank God! what a load off my back!

1 Like