3 Replies Latest reply: Mar 1, 2013 9:55 PM by WagMobBook
WagMobBook Level 1 Level 1 (0 points)

Hi,

    

     I had implemnted and tried to use sound in my html5 widget but it is not working after putting them in ibooks.

 

Following is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Untitled Document</title>

<script>

function init()

{

 

          setInterval(function(){sound();},0)

}

function sound()

{

          document.getElementById("audio").play();

}

</script>

</head>

 

 

<audio>

  <source src="against.mp3" type="audio/mpeg">

Your browser does not support the audio element.

</audio>

 

  Your browser does not support the video tag.

</audio>

 

 

 

<body onload="init();">

</body>

</html>

 

I tried using different formats like m4a, mp3 etc i tried adding and removing controls but it is not working at all.

 

Kindly suggest me any corrections i need to make or any changes that could make my widgets with working sound.


iBook, iOS 6.1