UnityPlugin-AVProVideo
UnityPlugin-AVProVideo copied to clipboard
Audio Clipping when OpenMedia by url in WebGL build if SupportPositionalAudio is turned on
Issue
The issue is this very loud clipping sound when opening a video in a browser through url while SupportPositionalAudio is set to true, you know like when you plug an electric guitar into a working amp or headphones into a mini jack while wearing them. Note that the clipping sound does not reappear after 2-nd or sometimes 3-rd OpenMedia on any other gameobject or url Also clipping sound can be heard when closing a browser tab while any video is playing
To Reproduce
- Create gameobject with
MediaPlayer,ApplyToMesh,AudioOutput,MeshRendererandAudioSourcecomponents - Set
ApplyToMeshto target yourMeshRenderer - Set your
MediaPlayerreferences where needed (ApplyToMesh,AudioOutputetc.) - Set
AutoPlayandAutoOpento false - Set
SupportPositionalAudioonAudioOutputto true - Upload the build or localhost it with something like nginx (sorry i'm not familiar with hosting and stuff)
- Open your build in a browser, chrome, firefox or safari
- Perform
OpenMedia(MediaPathType.AbsolutePathOrURL, url, true);where url is your target video, for example we use AWS
Tested on
- Unity version: 2019.4.30f1, 2021.3.16f1, 2021.3.21f
- AVPro Video version: 2.9.1
- Operating system version: built with Windows 10, macOS Sonoma 14.1.2
- Browser: chrome, firefox, safari (haven't tried other browsers)
- Video specs: 1280x720, 29.97fps, 403KBps
- Other: WebGL build with webGL 2 api and brotli compression
- Video hosted with AWS R2
Video Sample
The issue persists with any video on our servers, but just in case, here is the one i'm testing with https://r2.anasaea.dev/MUggAUQ42m8.mp4