Skip navigation

Integrating sound in html5 widgets of i book.

360 Views 3 Replies Latest reply: Mar 1, 2013 9:55 PM by WagMobBook RSS
WagMobBook Level 1 Level 1 (0 points)
Currently Being Moderated
Feb 19, 2013 11:09 PM

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

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.