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

Unlock html audio one time #6417

Open
rexrainbow opened this issue Mar 17, 2023 · 2 comments
Open

Unlock html audio one time #6417

rexrainbow opened this issue Mar 17, 2023 · 2 comments

Comments

@rexrainbow
Copy link
Contributor

rexrainbow commented Mar 17, 2023

On ipad Safari, Here is a test case.

  • SceneA and SceneB load html5 audio individually.
  • SceneA can play sound after touch event
  • SceneB needs touch event to unlock loaded html5 audio.

Is it possible unlock html audio one time, instead of unlock per-scene?

@photonstorm
Copy link
Collaborator

This whole section needs recoding, I'll have a look at it.

@rexrainbow
Copy link
Contributor Author

rexrainbow commented Mar 18, 2023

Play html audio with Howler.js

Compared with phaser3's html audio on ipad safari

  1. Howler: SceneA can play sound after 1 touch event.
    P3 : SceneA can play sound after 2 touch events. Guess that one for unlock, the other for playing audio
  2. Howler: SceneB can play sound wo any touch event
    P3 : SceneB can play sound after 1 touch event.

It seems that P3 html audio needs 1 extra touch event, per scene.

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