?
Solved

Audio player won't start songs automatically on my Android phone

Posted on 2016-07-25
3
Medium Priority
?
106 Views
Last Modified: 2016-07-27
I have a series of each of which has its own page with code that should make the song start playing automatically but it doesn't. Here's the code I'm using, what can I add or modify that will make the song start playing on load or perhaps within 2 seconds.
<audio src="Songs/Man Of My Words.mp3" controls>    
	<embed 
	src="Songs/Man Of My Words.mp3"
	width="360"
	height="90"
	loop="false"
	autostart="true" />   
</audio>

Open in new window


Thanks!
John
0
Comment
Question by:gabrielPennyback
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Expert Comment

by:Justin Smith
ID: 41728675
http://www.thesitewizard.com/webdesign/backgroundmusic.shtml

This might help a little.

Or try this code:

try this html5 code.....

 <html>
<body>

<audio controls autoplay>
  <source src="zui you ji.mp3" type="audio/mpeg">
</audio>

</body>
</html>
0
 
LVL 47

Accepted Solution

by:
Jackie Man earned 2000 total points
ID: 41728897
Which browser you are using?

Autoplay on load is blocked by the browser by default.

If you are using Chrome on Android, you need to change the settings.

1. type chrome://flags and press enter in URL

2. Find "Disable gesture requirement for media playback" and enable this setting

Source: http://stackoverflow.com/questions/12587977/html5-audio-chrome-on-android-doesnt-automatically-play-song-vs-chrome-on-pc-d
0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 41732123
Hi Jackie, thanks.  I couldn't find it at first because I was looking for the words "Disable gesture requirement for media playback." On a second scroll, I happened to notice "gesture requirement for media playback," which was enabled and all I had to do was disable it. And that did it!

Thanks again, John
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question