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

Android resume failure, state 'resuming' #676

Closed
k888168168 opened this issue Dec 21, 2016 · 4 comments
Closed

Android resume failure, state 'resuming' #676

k888168168 opened this issue Dec 21, 2016 · 4 comments

Comments

@k888168168
Copy link
Contributor

Hi all,
I'm using howler in a cross domain iframe.
In Chrome Desktop version. It plays well.
But in Chrome Android version, I will got and warning message by AudioContext.resume() .

An AudioContext in a cross origin iframe must be created or resumed from a user gesture to enable audio output.

The last Howler.state was be 'resuming'.
And can not play audio anymore.
How could I fix it?

@goldfire
Copy link
Owner

You could set autoSuspend to false and this shouldn't be an issue (https://github.com/goldfire/howler.js#autosuspend-boolean-true).

@k888168168
Copy link
Contributor Author

I try to set autoSuspend be false
But It not work.

@k888168168
Copy link
Contributor Author

k888168168 commented Dec 26, 2016

We are assume self.ctx.resume().then( handle_function ) (in howler.core.js line:398)
the handle_function will be call.
In cross domain iframe and no gesture interation, handle_function will not be call.
So self.state will stop at 'resuming'.

@k888168168
Copy link
Contributor Author

#679

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