0

I'd like my Flutter game to start its music when the app is loaded into Chrome. Chrome disables audio autoplay because ads abuse it. Is there a way around this for a Flutter app?

Or do I have to rely on manually editing the built HTML file to include one of the general autoplay hacks, like in How to make audio autoplay on chrome ?

Michael Gundlach
  • 106,555
  • 11
  • 37
  • 41
  • I think it’s probably best to embrace the restriction. Have a click / “press key” to start screen that will satisfy the “user interaction“ condition of the auto play policy – fdcpp Oct 21 '22 at 07:06
  • Thanks @fdcpp . I didn't read carefully in the question I linked to see that all their methods were no longer working anyway. I agree with you. – Michael Gundlach Oct 24 '22 at 01:05

1 Answers1

1

You can't. None of the methods in the linked question work anymore. Have the user click or press a key to start the game and then you can start audio.

Michael Gundlach
  • 106,555
  • 11
  • 37
  • 41