Pagegangster logo

TIPS & TRICKS

How to insert videos in a standalone

Introduction It’s possible to add video in your publication if you buy a standalone - and do a little bit for manual work. We are working on an online editor but until it’s finished this is the way to do it.

Supported video formats Before you start it’s important to notice that you can only work with flash video (flv). If your video is mov, wmv or another format you can use ffmpeg to convert them: http://ffmpeg.org/documentation.html

Start When you have downloaded the standalone, unzip the files and go to the player/xml folder. In here you will find the file media.xml.

Note: Before you do anything please take a copy off the file so you don’t have to download it again in case you do something wrong and mess it up ;·)

Open the file with a text editor like notepad, TextEdit or another simple text editor that can handle xml files.

The file should look like this:

<pages>
<page id=”1” />
<page id=”2” />
<page id=”3” />
...
</pages>


if you have links in you publication it might be a bit more complex but don’t worry. Copy paste the content and go to http://www.thedeveloperday.com/tools/beautyXML/. Paste the code into the input field and press submit. Then you will get nicely formated xml. Copy and paste the code back into the media.xml file.

Insert a video To insert a video on page 1, there are two possibilities:

If the page tag look like this <page id=”1” /> you need to replace with:

<page id="1">
<media id="0" type="video">
<url>files/videos/dyrup.flv</url>
<startOn>mouseover</startOn>
<width>50</width>
<height>58</height>
<x>25</x>
<y>83</y>
</media>
</page>


If there is already a “media” tag within the “page” tag then you just need to insert another “media” tag. It will then look like:

<media type="video">
<url>issue/media/Tal_R_MASTER.flv</url>
<startOn>mouseover</startOn>
<width>30</width>
<height>25</height>
<x>25.5</x>
<y>25.5</y>
</media>

Explanation of the variables

url:The path to the flv video file relative to the start.swf file located in the player folder.
startOn: You can set this variable to:
turned (video start when the page is flipped)
turning (video start when turning the page)
press (video start on press)
width, height, x, y: These variables is given in percentage of the page height and width. The x, y has it’s registration point (0,0) in the top left corner.

That's it! Save your files and your video-publication should be ready to impress friends and customers ...