Solution 1:
The problem is that IE11 makes you enable the setting "Play Sounds in Webpage" before any sounds will play. Which, in my opinion, is a willing and intentional breakage of HTML5 audio. I'm so pissed at MS for this. They constantly go against what they preach, and they wonder why nobody uses their shitty browser anymore. Anyway, here's how to enable the setting:
Open Internet Explorer, click the Tools button,
Click Internet Options. Tap or click the Advanced tab
Under Multimedia, select Play sounds in webpage.
Click Apply, OK. Now check if you can play the mp3 files.
As far as a programmatic fix for this, I don't know of any. You could alert IE users to change their setting, or you could offer a download link as an alternative to the in-browser player.
Solution 2:
This will do the trick:
IE--> Internet Options--> Advanced--> Enable play sounds in webpages.
source: https://forums.asp.net/t/2111915.aspx?Error+Audio+Playback+was+aborted
Solution 3:
Your source type looks like it may be incorrect. Try this:
<audio controls>
<source src="myAudioFile.mp3"type="audio/mpeg"/>
</audio>
Solution 4:
Some Times html5 audio tag doesnot work without controls or clear its chaches and try below code if any problem please reply. Hope so you are out of trouble. Have a good day
<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>Audio Tag</title></head><body><!--Before HTML5, Developer can add audio tag by Plug-in like FLASH. But HTML5 introduces an audio tag for embedded an audio media in a web page**strong text**--><audiocontrols="controls"><sourcesrc="Allegro%20from%20Duet%20in%20C%20Major.mp3"type="audio/mp3"></audio></body></html>
Post a Comment for "