Youtube video in epub3

332 views
Skip to first unread message

Thibault LEONARD

unread,
Jan 29, 2014, 9:38:37 AM1/29/14
to epub-work...@googlegroups.com, Nadja Vincze
Hi all,

Does anyone know the way to add youtube video in epub3? Our objective is to avoid embedding video file in the epub (to reduce weight of the file). 

We have been looking around for information on how to solve that problem but so far we did not find any solution. (see previous discussions here : http://idpf.org/forum/topic-891).

Thanks in advance for your help.

Thibault
_________________
Thibault LEONARD
Founder & CEO
Primento - Digital publishing at a glance

I welcome VSRE* emails
* VSRE means Very Short Reply Expected (max 5 words) – vsre.info

Daniel Weck

unread,
Jan 30, 2014, 10:51:32 AM1/30/14
to epub-work...@googlegroups.com, Nadja Vincze
As I'm sure you know already, with EPUB3 you can easily reference
external video assets ("remote-resource" property for manifest items
with HTTP URLs), and embed them using the regular "video" HTML5
element. This is an interoperable solution supported by iBooks and
other reading systems.

The YouTube embed API forces the use of a bootstrapper which populates
an iframe with HTML5 UI controls + underlying "video" tag. The actual
video@src is a dynamic URL (YouTube content servers) that is obtained
at some stage in the YouTube initialisation protocol. In fact, you can
easily find this temporary / session URL, and use it to dynamically
instantiate an HTML5 video player outside of the iframe's context
(just use postMessage() or the YouTube API to kick-start the
instantiation protocol, then walk the iframe's document tree to find
the updated video@src).

Unfortunately, iBooks (for example) implements security measures that
prevent the iframe to fully load in the first place. I expect other
reading systems would take similar sensible precautions to minimise
the risk of compromising the integrity of the the e-book content.

Note that Vimeo now supports HTML5 video, but the embed API currently
still requires Flash. As with any other video hosting service, their
obfuscating API probably does lots of weird things behind-the-scenes,
all of which isn't really compatible with the e-book security model
(e.g. ads, analytics, etc.).

Daniel
> * VSRE means Very Short Reply Expected (max 5 words) - vsre.info
>
> --
> You received this message because you are subscribed to the Google Groups
> "EPUB Working Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to epub-working-gr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages