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 WebAudio playback due to autoplay policy changes #37

Merged
merged 1 commit into from Feb 19, 2018

Conversation

Projects
None yet
7 participants
@beaufortfrancois
Copy link
Contributor

commented Feb 5, 2018

Due to upcoming Autoplay policy changes, an AudioContext must be created or resumed after the document received a user gesture to enable audio playback.

More at https://webaudio.github.io/web-audio-api/#dfn-allowed-to-start

/me excited to contribute to this essential PWA ;)

@beaufortfrancois beaufortfrancois requested a review from PaulKinlan Feb 5, 2018

@PaulKinlan PaulKinlan merged commit 26f4ba5 into master Feb 19, 2018

1 check passed

cla/google All necessary CLAs are signed
@PaulKinlan

This comment has been minimized.

Copy link
Member

commented Feb 19, 2018

thank you

@beaufortfrancois beaufortfrancois deleted the beaufortfrancois-patch-1 branch Feb 19, 2018

@AdrianJagodznski

This comment has been minimized.

Copy link

commented Sep 20, 2018

Can you fix this?

The Web Audio autoplay policy will be re-enabled in Chrome 70 (October 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
_ @ howler.core.min.js?v=7ed9cd42da:2
init @ howler.core.min.js?v=7ed9cd42da:2
o @ howler.core.min.js?v=7ed9cd42da:2
(anonymous) @ root_framework.js.eff0f9a9c6760d3af9e5655dad9a9906.js?v=7ed9cd42da:838
createModule @ root_library.js.df4bbad334f2141f77417cb64963a856.js?v=7ed9cd42da:34
(anonymous) @ root_framework.js.eff0f9a9c6760d3af9e5655dad9a9906.js?v=7ed9cd42da:838
(anonymous) @ root_framework.js.eff0f9a9c6760d3af9e5655dad9a9906.js?v=7ed9cd42da:842

howler.core.min.zip

@KyleSanderson

This comment has been minimized.

Copy link

commented Oct 23, 2018

@beaufortfrancois you've destroyed background audio playing in atleast all https://github.com/ValveSoftware games. Can you please revert this or come up with a suitable way to play music in the background for people using CEF?

@KyleSanderson

This comment has been minimized.

Copy link

commented Oct 23, 2018

https://ice.plaguefest.com/radio.html for an example (check out JS).

	RegAdminCmd("sm_djrst", OnResetStreamAll, ADMFLAG_ROOT, "DJ made a mistake, save themselves.");
	RegAdminCmd("sm_djs", OnStreamStats, ADMFLAG_ROOT, "Stream Stats.");
	RegConsoleCmd("sm_djr", OnResetStream, "Reset the stream.");
	RegConsoleCmd("sm_djf", OnForgetDJ, "Toggles Eligibility of Radio.");
	RegConsoleCmd("sm_djv", OnDJVolume, "Increases or Decreases the volume of the Radio.");
	RegConsoleCmd("sm_djt", OnDJTrack, "Prints the Present Track.");
@textfiles

This comment has been minimized.

Copy link

commented Oct 23, 2018

Anybody who is coming late into this would do well to see the original announcement and the tidal wave of reaction to this poor approach, followed by what is apparently 8 months of waiting for the furor to die down and then re-introduce it:

https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

@woodydeck

This comment has been minimized.

Copy link

commented Mar 2, 2019

I wasn't aware of this issue until developing a game in Phaser. Then I read about media engagement indexes from the link in the console log. This was the straw that broke the camel's back. Chrome is uninstalled for me, and I will not support the browser as an independent developer.

This issue is analogous to social credit scoring in China, which I'm certain someone google related had a hand in implementing. Sad.

@KyleSanderson

This comment has been minimized.

Copy link

commented Mar 2, 2019

@woodydeck yeah; I actually lost a friend over this ( @psychonic ). I'm using a couple 0days now as @Nephyrin and @kisak-valve really don't give a shit as TF and similar are end of life. Honestly the entire thing is tragic but all you can do is hope for the future (and that clients don't crash when you're running shell code; Linux is ironically a nightmare).

@Tectract

This comment has been minimized.

Copy link

commented May 29, 2019

No idea what I'm looking at. I got here because of this bug:

The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu

How do I re-enable audio, or bypass/fix this bug? My application plays audio to ALERT people to look at the page, not in response to any user action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.