View Full Version : The Videos in the EPUB get automatically played when the EPUB is opened in the iBook


rangaman
11-29-2011, 07:14 AM
Can anybody help me on this?

I have developed EPUB for iPad2, with embedded video files of type MP4. When I opened the EPUB in iPad , the videos in the EPUB were playing automatically. I tried hard many methods to resolve this. But ended up with failure.


Below is the tag that I have used to embed the video file:


<video width="480" height="360" controls="true" autoplay="false">

Advance thanx for any help.

JSWolf
11-29-2011, 10:32 AM
Go to Liz Castro's blog and have a read. lots of good info for iBooks.

http://www.pigsgourdsandwikis.com/

Also, buy her book.

Toxaris
11-29-2011, 01:59 PM
I know the answer! Remove the <video> tag and the video will not play automatically and the ePUB will react as a normal book!

shorshe
12-18-2012, 04:45 AM
Do you still have this Problem?
I can confirm the same behavior. I used Liz Castros Method, but the videos still autoplay.

<div class="video">
<video autoplay="false" controls="true" height="280" poster="../Images/rock.png" src="../Video/rock.m4v" width="340">Video</video>
</div>

mzmm
12-18-2012, 01:24 PM
if the autoplay attribute is present the video will autoplay. if you remove it altogether it should work (ie, not autoplay)

fun times:

http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_video_autoplay

dgatwood
12-19-2012, 03:35 PM
Please file a bug. Please. File a bug. (http://bugreport.apple.com/)

mzmm
12-19-2012, 07:27 PM
@dgatwood - i don't think this is a bug. i may be missing something here, but 'autoplay' is a boolean attribute, which i understand to mean that if it is present in the <video> element it's necessarily true, and false only if absent.

html5 specs state:

The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.

this would mean that <video autoplay/> autoplays, and <video/> does not.

read more here:

http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#boolean-attributes

shorshe
12-20-2012, 06:37 AM
Removing autoplay alltogether did the trick. Videos do not autoplay in ibooks. I misunderstood the concept of a boolean attribute.

dgatwood
12-20-2012, 12:15 PM
@dgatwood - i don't think this is a bug. i may be missing something here, but 'autoplay' is a boolean attribute, which i understand to mean that if it is present in the <video> element it's necessarily true, and false only if absent.


Ah. I see the problem. The spec for the video tag is inconsistent with the behavior of all of the previous tags that did the same thing. For example, the <embed> tag requires you to specify autostart="false" or else it automatically plays.

So I still say "file a bug", but file it with the W3C and tell them that they need to fix the spec so that browsers are required to handle autostart="false" and autostart="true" in the obvious way.

mzmm
12-20-2012, 07:57 PM
The spec for the video tag is inconsistent with the behavior of all of the previous tags that did the same thing.

HTML5 vs. HTMLn i guess.