-2

I am creating a page with an embedded audio player that works on all systems I have tested, except on Android. The players do appear on the page, but you cannot start them playing.

I've tried both the <audio> tag and SoundManager 2, checked whether the device does normally play mp3 files with HTML5 Audio Formats Test (which it does), and downloaded that same test to my server and checked whether it worked there (which it doesn't). And I cannot find anything helpful in the log files.

Any ideas what I could do?

edit: I have since tried the same with Apache on the same server and with Nginx on another server with the same results.

Pascal
  • 99
  • 2
  • 5

2 Answers2

2

I tried the files on my nginx server and all of them except flac work on android 4.4 with the default Browser and Firefox.

This is the tag I used:

<audio preload="auto" controls="">
   <source src="Test/Audio/mp3.mp3" type="audio/mpeg">
</audio>

Maybe you have not set your mime types in the nginx configuration correctly. You will need:

types {
  audio/mpeg                          mp3;
  audio/ogg                           oga ogg opus;
  audio/webm                          weba;
  audio/vnd.wave                      wav;
}

This can be done by importing mime.types in the server block and adding missing types.

If this did not help please write which browser/version you use ;)

zuim
  • 180
  • 1
  • 7
  • Thank you for your answer! Unfortunately, that was not the problem. All (needed) types were already set. – Pascal Apr 26 '16 at 09:32
0

The problem was caused by the fact that the page was protected with a password.

Pascal
  • 99
  • 2
  • 5