Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundManager's audio does not work with createMediaElementSource when motion sound was played #140

Open
hohoaisan opened this issue Apr 8, 2024 · 1 comment

Comments

@hohoaisan
Copy link

When I use audio element in Motion Manager's callback motionManager.on("motionStart", (group, index, audio) => {}) with createMediaElementSource for output the sound to different audio destination sources, the error message was below

MediaElementAudioSource outputs zeroes due to CORS access restrictions for [file name specified]

Some stackoverflow answers suggested adding crossOrigin attribute with value "anonymous" to audio element, I applied for the build code of pixi-live2d-display and it works just fine. But not for directly modifying the audio element of motion manager's callback above.

I have to patch the SoundManager for the workaround, but still suggest adding extra crossOrigin option than current volume for SoundManager

@guansss
Copy link
Owner

guansss commented Apr 8, 2024

Yeah this would be a nice feature. There's already a crossOrigin option when creating the model, but that only applies to image elements, I'll make it also work for audios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants