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

The AudioContext was not allowed to start #1657

Closed
mmasomi73 opened this issue May 24, 2019 · 9 comments
Closed

The AudioContext was not allowed to start #1657

mmasomi73 opened this issue May 24, 2019 · 9 comments

Comments

@mmasomi73
Copy link

Hi

i tired really :(
i see #1531 & #1560

Examples is work correct without Error, But my samples not working, in issues not explain how fix this problem

@mmasomi73
Copy link
Author

mmasomi73 commented May 24, 2019

it's my sample: http://play.mmasomi.ir/

in local is work correctly but on host not work

@thijstriemstra
Copy link
Contributor

@mmasomi73 what browser, what operating system, what wavesurfer.js version etc

@mmasomi73
Copy link
Author

any supported browser such as chrome v.74
wavesurfer.js 2.2.1
in local system is ok but when put on host not work

please help me, how fix them?

@mmasomi73
Copy link
Author

all my code: https://github.com/mmasomi73/player

@thijstriemstra
Copy link
Contributor

you need to call wavesurfer.backend.ac.resume() in a button click to work around the autoplay restrictions in chrome i think.

@mmasomi73
Copy link
Author

thanks, i use that but not working

when i use <audio> tag and play once with <audio> tag and after reload page is work
and every time reload page show download audio alert

@moussa-io
Copy link

moussa-io commented Jun 3, 2019

Have the same problem. wavesurfer.backend.ac.resume() does not remove the warning. In addition to that, it does play on safari/chrome for iOS, but without any sound. You can try the example at the home page of https://wavesurfer-js.org

@thijstriemstra
Copy link
Contributor

wavesurfer.backend.ac.resume() does not remove the warning

try creating a new audio context in a button click handler, and then create wavesurfer instance and pass in that audio context.

@thijstriemstra
Copy link
Contributor

Marking this as a duplicate of #1531.

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

3 participants