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

fix sound not playing under certain operations (smartphone) #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rutan
Copy link
Contributor

@rutan rutan commented Nov 7, 2019

I found a WebAudio._onVisibilityChange problem.

WebAudio._onHide and WebAudio._onShow adjust the volume when the browser visibility changes for Smartphone (especially Android OS).
But, WebAudio._onHide and `WebAudio._onShow have different fade duration.

  • WebAudio._onHide : 1sec
  • WebAudio._onShow : 0.5sec

The following operations will cause problems.

  1. Launch game on Android Chrome
  2. Press the home button to hide Chrome (and run WebAudio._onHide )
  3. Open Chrome within 0.5 seconds (= 1sec - 0.5sec)

When this operation is performed, the fade-out time will be longer than the fade-in time.
Then the sound will be muted all the time 😢

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

Successfully merging this pull request may close these issues.

1 participant