Play mp3 file on web page

In an ASP.NET environment, what's the best way to play an mp3 file? Do I need to use a Flash plugin (some users may not have a flash). In addition, this should work on the iPhone or iPod.

+4
source share
2 answers

The HTML 5 tag will be your best bet for iPhone, since Flash is not supported, but keep in mind that HTML 5 is not yet supported on most computers on the Internet, because the hippo of the browser world (Internet Explorer) does not yet support it. This will change with IE9 when it is released, but there will still be many people / entities that will not be updated.

If you care about an audience that does not support HTML 5, you will need to use an alternative method, such as Flash or Silverlight. Fortunately, the audio tag takes this into account, allowing you to specify alternative content if the tag is not supported.

<audio src="blah.mp3" controls="controls"> Put alternate content here </audio> 
+6
source

The HTML 5 <audio> ideal for this situation. It also works great on iPhone / iPod, unlike buggy, bloated and unnecessary Flash flash.

+1
source

Source: https://habr.com/ru/post/1309935/


All Articles