Embedding Flash, Audio, Video, PDF and other documents in eBook
pages
To add Flash, Audio, Video, PDF or other documents to the pages
of your eBook, you should use the EMBED or the OBJECT tag that
allow the insertion of arbitrary objects directly into HTML pages.
Embedded objects are supported by application-specific
plug-ins.
The most common plugins are for sounds and movies. The EMBED and OBJECT tags
give the location of a data file that the plug-in should handle.
Use the EMBED tag if the default plug-in must be used to play the data
file.
If you wish to specify the plug-in that must
be used for playing, use the OBJECT tag.
Below you can find examples of using the EMBED and the OBJECT
tags for adding Flash/Audio/Video/PDF files to your pages
with ease. Just copy/paste and modify the URL, Width and Height values.
Universal code for playing/executing a data file with its default
plug-in.
<EMBED
SRC="File.swf" HEIGHT='200'
WIDTH='200'>
|
Code for playing Flash files with the Macromedia Flash Player plug-in.
<OBJECT
CLASSID="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 " WIDTH="200" HEIGHT="200">
<PARAM name="movie" value="File.swf">
<PARAM name="quality" value="high">
</OBJECT>
|
Code for playing Audio/Video files with the Microsoft Media Player
plug-in.
<OBJECT
ID=MediaPlayer
CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715
standby="Loading
Microsoft Windows Media Player components..."
TYPE="application/x-oleobject" width="200" height="200">
<PARAM NAME="FileName" VALUE="File.avi">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="AutoStart" VALUE="false">
<PARAM NAME="DisplaySize" VALUE="4">
<PARAM NAME="Enabled" VALUE="TRUE">
<PARAM NAME="EnableContextMenu" VALUE="FALSE">
<PARAM NAME="ShowControls" VALUE="TRUE">
</OBJECT>
|
Code for displaying PDF documents with the Adobe Acrobat Reader
plug-in.
<OBJECT
CLASSID="CLSID:CA8A9780-280D-11CF-A24D-444553540000"
WIDTH="200" HEIGHT="200">
<PARAM NAME="src" VALUE="File.pdf">
</OBJECT>
|
If video/audio files are of a large size, it is not recommended
to include them in the EXE file. It is better to do it so that multimedia
files are located in the directory with the exe file of the eBook
or in one of its subdirectories. The '$$ebookdir' macro is used for
the eBook to be able to use external files in the eBook directory.
Suppose you want to play the file 'video.avi' on some page and it
is located in the directory with the exe file of the eBook. In this
case, the path to the file will be '$$ebookdir/video.avi'.
The complete part of html code for playing this file with Media Player will look
as follows:
<OBJECT
ID=MediaPlayer CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95
CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715
standby="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject" width="200" height="200">
<PARAM NAME="FileName" VALUE="$$ebookdir/video.avi">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="AutoStart" VALUE="false">
<PARAM NAME="DisplaySize" VALUE="4">
<PARAM NAME="Enabled" VALUE="TRUE">
<PARAM NAME="EnableContextMenu" VALUE="FALSE">
<PARAM NAME="ShowControls" VALUE="TRUE">
</OBJECT> |
|