- Home /
Mute video player audio in WebGL not working
I've tried multiple methods to mute the audio coming from a video player component on a WebGL build to no avail. Has anyone found a solution?
My current Audio Output Mode is set to Audio Source. I'm streaming videos from a URL as necessary for playing videos using a video player component on WebGL builds. The video files are .mp4 files, just for reference.
I've tried various methods:
1) Mute audio listener
2) Mute audio source (connected to the video player)
3) Reduce volume of audio source
4) Reduce volume of audio mixer
Nothing works. Would love any input!
so this is still a bug?? $$anonymous$$y game is on an older Unity 5.6.3p2 version right now... and wanted to know if this had been fixed since... I had this issue first more than a year ago... reported it to Unity devs... was told it was a "known issue"... (they even sent me a unity 2017 tshirt for the bug reports)... back then 2017 would not even export to webgl as that was broken too... so its not fixed yet? ouch...
Answer by Memorix101 · Jan 25, 2018 at 01:27 PM
Sorry, I can't help. I have the same issue. :( Also, the Videoplayer doesn't play in Firefox for me (if audio channel is muted or on channel 0).
Answer by FireHawkX · Apr 03, 2018 at 07:49 PM
I actually managed to find an answer... seems like the bug I opened last year had been addressed.
Here is the answer :
The VideoPlayer's Direct audio output mode's current definition is to bypass the Unity audio processing entirely, including volume processing, so you'll have to manage the VideoPlayer's volume explicitly.
This is the case for all platforms where Direct audio output mode is supported (currently OSX, iOS, WebGL, Tizen and PS4).
For platforms where the AudioSource output mode is supported (which unfortunately doesn't include WebGL), the volume processing for audio from the VideoPlayer happens as expected.
Future improvements will track AudioSettings.volume and apply it to VideoPlayer's direct audio volume automatically.
Sorry for the inconvenience!
Now we just need to figure out how to do that :)
Your answer
Follow this Question
Related Questions
video-audio not playing in build (i tried webgl and android) 0 Answers
Why video does't have sound on runtime? 2 Answers
All Unity-related audio stopped working 2 Answers
Videoplayer Component in WebGL with OAuth2 url. 0 Answers
playing audio from a video clip 0 Answers