How to make an audio tag with auto play in android chrome? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make an audio tag with auto play in android chrome?

<iframe style="display:hidden; frameborder="0" allow="autoplay" id="iframeAudio" width="100%" height="150" src="https://clyp.it/bf3ff5qb"> </iframe> 🖕🖕🖕The given code doesn't support autoplay in android chrome browser.

8th Oct 2018, 7:41 PM
Mr. Jay Koranga
Mr.  Jay Koranga - avatar
1 Answer
0
If you have Chrome 61+, visit this link: chrome://flags/#autoplay-policy Open the option's menu. Choose your desired behavior: No user gesture is required <-- probably this one User gesture is required for cross-origin iFrames -- like "no user gesture is required" but A/V from other sites require user interaction. Document user activation is required -- Users must interact with the document before A/V can autoplay
8th Oct 2018, 8:50 PM
Kirk Schafer
Kirk Schafer - avatar