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

examples/flappy: Audio not working on Wasm/Firefox #2970

Closed
1 of 11 tasks
johanbrandhorst opened this issue Apr 26, 2024 · 3 comments
Closed
1 of 11 tasks

examples/flappy: Audio not working on Wasm/Firefox #2970

johanbrandhorst opened this issue Apr 26, 2024 · 3 comments

Comments

@johanbrandhorst
Copy link

Ebitengine Version

v2.7.2

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

go version go1.22.0 linux/arm64

What steps will reproduce the problem?

Build the flappy example for Wasm:

$ GOOS=js GOARCH=wasm go build -o flappy.wasm ./examples/flappy/

Execute in the browser

What is the expected result?

Flappy gopher with sound is playing

What happens instead?

Flappy gopher without sound is playing

Anything else you feel useful to add?

I see a console warning:

An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page.

Seems very suspicious.

@github-actions github-actions bot added the os:js label Apr 26, 2024
johanbrandhorst added a commit to johanbrandhorst/wasm-experiments that referenced this issue Apr 26, 2024
Also update to latest version. Unfortunately the audio is broken,
so I raised hajimehoshi/ebiten#2970.
@hajimehoshi hajimehoshi added this to the v2.8.0 milestone Apr 27, 2024
@hajimehoshi
Copy link
Owner

I failed to reproduce the issue. https://ebitengine.org/en/examples/flappy.html worked with audio.

@johanbrandhorst
Copy link
Author

That page works for me, and I finally got it to work sometimes locally. I can't tell what it was that made it work, but it seems... temperamental. I'll close this for now and let you know if I can establish a pattern. Thank!

@hajimehoshi hajimehoshi closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
@hajimehoshi
Copy link
Owner

Thanks! Feel free to reopen this when you find this issue often happens again.

@hajimehoshi hajimehoshi removed this from the v2.8.0 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants