Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Integrating sound in html5 widgets of i book.

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

Posted on Feb 19, 2013 11:09 PM

Reply
3 replies

Feb 20, 2013 3:40 AM in response to WagMobBook

See iBooks Author: Add video to your iBooks - Support - Apple


You can also include audio and video in HTML widgets. iBooks Author doesn't optimize video or audio files included in HTML widgets like it does for Media and Keynote widgets. You will need to prepare video and audio for HTML widgets manually.

  • For video, you should use files with an .mp4 file extension.
  • For audio, use files with an .m4a file extension.
  • You cannot use media that has .m4v or .m4p file extensions.
    Note: Video and audio media in HTML widgets are not DRM protected.

Integrating sound in html5 widgets of i book.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.