aframe icon indicating copy to clipboard operation
aframe copied to clipboard

`sound` component not loading audio in Firefox

Open dsinni opened this issue 6 years ago • 3 comments

Description:

Using the current A-Frame master, when trying to auto play audio with the sound component using autoplay: true, either the loading screen times out and the audio doesn't play, or the loading screen skips and the audio doesn't play.

This seems to be affecting Firefox on pretty much every platform I've tested. In Chrome, everything loads almost immediately and the audio plays as expected.

In Firefox, console says:

components:sound:warn Sound not loaded yet. It will be played once it finished loading 

The audio never plays.

If I try document.querySelector('audio'), play(), it will play, but it appears the sound component gets hung up.

document.querySelector('[sound]').components.sound.playSound() throws the same console message.

I processed the audio with ffmpeg in the second demo, to make sure it wasn't an encoding issue, but no dice.

  • A-Frame Version: master 826e983d989312fe7cd75b9cc92e58b7a5cc195f
  • Platform / Device: Firefox on Windows/Mac/Android...
  • Reproducible Code Snippet or URL:

https://bunker-bake.glitch.me https://spiral-lipstick.glitch.me

dsinni avatar Nov 15 '18 19:11 dsinni

I'm finding that using <a-asset-item response-type="arraybuffer" ... > works, but using <audio> doesn't.

Any ideas why that would be?

dsinni avatar Nov 20 '18 21:11 dsinni

I still have this issue on the most recent versions of Aframe (1.1). Has anyone come up with a "best-practise" of how to workaround this issue?

PlumCantaloupe avatar Dec 17 '20 01:12 PlumCantaloupe

I still have this issue on the most recent versions of Aframe (1.1). Has anyone come up with a "best-practise" of how to workaround this issue?

Still in version 1.2.0

lijualivenow avatar Mar 16 '22 11:03 lijualivenow