Neil Meyer
Neil Meyer

Reputation: 587

Problems with website codes in different browsers

I have this code that is working perfectly for Firefox but when I try to get IE to play the audio files Error (Playback was aborted)

I don't want to optimize my site for just one browser so am wondering what I'm doing wrong.

<html>
<HEAD>
<TITLE>...</TITLE>
</HEAD>
<BODY>
<H1 ALIGN="CENTER">...</H1>
<P ALIGN="CENTER"> <IMG SRC="../picture/1.jpg"></P>
<P ALIGN="CENTER"> ...</P>
<P ALIGN="CENTER"> <audio controls><source src="../audio/1.mp3" type="audio/mpeg"></audio></P>
<P ALIGN="CENTER"> ...</P>
<P ALIGN="CENTER"> <audio controls><source src="../audio/2.mp3" type="audio/mpeg"></audio></P>
<P ALIGN="CENTER"> ...</P>
<P ALIGN="CENTER"> <audio controls><source src="../audio/3.mp3" type="audio/mpeg"></audio></P>
<P ALIGN="CENTER"> ...</P>
<P ALIGN="CENTER"> <audio controls><source src="../audio/4.mp3" type="audio/mpeg"></audio></P>
</BODY>
</html>

I have edit the titles out. Why does IE Restrict scripts or active X controls?

ERROR 1 ERROR 2

Upvotes: 1

Views: 50

Answers (1)

Alvaro Montoro
Alvaro Montoro

Reputation: 29685

It is a safety feature. As you are running the file locally (not on a server or trusted site), Internet Explorer blocks the ActiveX controls and scripts because it considers that they may unsafe or harmful to your computer. I guess the idea is that IE doesn't know if you developed that page yourself, or if you downloaded it from somewhere potentially dangerous.

In SuperUser there is a possible solution for this. It is from 2010, but it sill applies to IE11:

  1. Open IE
  2. Go to tools > Internet options
  3. Click on the advanced tab
  4. Check the box "Allow active content to run in files on My Computer*"
  5. Restart the computer

Internet options with mandatory handfree circle to highlight option

Upvotes: 1

Related Questions