0

I have added this <audio> tag in my html page,

 <audio id="music" autoplay="autoplay" loop="true"><source src="~/Content/songs/music.mp3" type="audio/mpeg" /></audio>

if I run the web page with this <audio> tag into any PC browser it works fine, the music gets started on page load, but the same web page doesn't play any music in mobile browsers.
Tested it on android(chrome), windows(edge).

Please can anyone suggest something for it, is there something I missed here. Any help is appreciated.

There are some other posts for this type of question, but they are specifically for apple devices. I need to know if there are any workarounds for android or windows mobiles.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
sumngh
  • 566
  • 2
  • 10
  • 2
    Possible duplicate of ["Autoplay" HTML5 audio player on mobile browsers](http://stackoverflow.com/questions/26066062/autoplay-html5-audio-player-on-mobile-browsers) – j08691 Apr 18 '16 at 19:12
  • 1
    Usually mobile browsers won't autoplay audio or video as a precaution against incurring data charges – j08691 Apr 18 '16 at 19:13
  • @j08691, i read that one also, but that was related to Apple device specifically, so i didn't get the solution from there. So i have asked again this one. As it was required in urgency. Thank for your help – sumngh Apr 18 '16 at 19:21
  • ok. is there any work around for it , if we need it specifically on mobile browzers. Please suggest if there is. – sumngh Apr 18 '16 at 19:22

0 Answers0