Working in 2019.4.3f1
The sound of a video works perfectly on play mode using a url method, but when exported to webgl it looses all 3d aspects and is played all over the scene, I reviewed the documentation and I don’t think there are any unsupported settings. I’s this usual? is there a checklist I should be following? I looked around but it doesn’t seem there are others with the problem
Hi!
This isn’t well documented, but in the WebGL implementation, the VideoPlayer’s audio output goes directly to the output device without going through the normal audio processing that Unity offers. This is a limitation of the html5 video object used for implementing video playback on this platform. You can see a note about this in here: Unity - Scripting API: Video.VideoPlayer.audioOutputMode
So in this instance, it seems you’d have to approximate distance-based attenuation yourself, and apply the volume change directly on the VideoPlayer using VideoPlayer.SetDirectAudioVolume().
Hope this helps,
Dominique Leroux
A/V developer at Unity
1 Like