summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/media9/media9.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-05-11 20:54:48 +0000
committerKarl Berry <karl@freefriends.org>2015-05-11 20:54:48 +0000
commit2f48bc401a4d735d9ccb93564430e563092a863d (patch)
tree81fac81b83ed73787d4fa8804a6d54b954340702 /Master/texmf-dist/source/latex/media9/media9.tex
parent6871fba7f230af109b503359d3d7fa700c9966a3 (diff)
media9 (11may15)
git-svn-id: svn://tug.org/texlive/trunk@37332 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/media9/media9.tex')
-rw-r--r--Master/texmf-dist/source/latex/media9/media9.tex192
1 files changed, 150 insertions, 42 deletions
diff --git a/Master/texmf-dist/source/latex/media9/media9.tex b/Master/texmf-dist/source/latex/media9/media9.tex
index cd41fbdc650..83ea652d847 100644
--- a/Master/texmf-dist/source/latex/media9/media9.tex
+++ b/Master/texmf-dist/source/latex/media9/media9.tex
@@ -9,6 +9,8 @@
\listfiles
\documentclass[a4paper]{article}
\frenchspacing
+\usepackage[utf8]{inputenc}
+\usepackage{textcomp}
\usepackage[attachfiles]{media9}
%\usepackage[draft]{media9}
\usepackage{animate}
@@ -27,7 +29,7 @@
\usepackage{menukeys}
\usepackage{hyperref}
\usepackage{hypcap}
-\def\keywords{embed flash movie LaTeX pdf 3d include sound swf mp3 video mp4 h.264 aac flv audio multimedia streamed media rtmp YouTube animation JavaScript pdfLaTeX dvips ps2pdf dvipdfmx XeLaTeX u3d prc Adobe Reader RichMedia annotation LuaLaTeX}
+\def\keywords{embed flash movie LaTeX pdf 3d include sound swf mp3 video mp4 h.264 aac slideshow image gallery flv audio multimedia streamed media rtmp YouTube animation JavaScript pdfLaTeX dvips ps2pdf dvipdfmx XeLaTeX u3d prc Adobe Reader RichMedia annotation LuaLaTeX}
\hypersetup{
bookmarksnumbered,linktocpage,breaklinks,
pdftitle={The media9 Package},
@@ -43,6 +45,9 @@
}
\usepackage[scaled=0.85]{luximono}
+%\usepackage{listings}
+\usepackage{minted}
+
\def\XeLaTeX{X\kern-.1667em\lower.5ex\hbox{\reflectbox{E}}\kern-.125em\LaTeX}
\def\pXepLaTeX{(X\kern-.1667em\lower.5ex\hbox{\reflectbox{E}})\kern-.125em\LaTeX}
@@ -71,6 +76,7 @@
\def\month{#2}
\def\day{#3}
}
+\usepackage{siunitx}
\begin{document}
\makeatletter
@@ -93,15 +99,21 @@ This package provides an interface to embed, in the first place, interactive Fla
Among the supported media types, video and sound files require an additional Flash (SWF) application for playback, which must be either embedded into the PDF or loaded at runtime from the internet. There are numerous such players, both open-source and commercial, available on the internet. One of them is the highly configurable open-source `StrobeMediaPlayback.swf'~\cite{strobe}, maintained by Adobe and hosted on \href{http://sourceforge.net/projects/osmf.adobe/files/}{SourceForge.net}. Package `media9' comes with an enhanced version of `StrobeMediaPlayback.swf'. In addition, two simple players for video and audio, `VPlayer.swf' and `APlayer.swf' are included, which can be used instead. They provide sufficient functionality for playing embedded files and streamed media.
-Flash Player supports the efficient H.264 codec for video compression. MP4/H.264 video files can be encoded from existing video files and from numbered bitmap sequences using the \verb+ffmpeg+ (\url{http://ffmpeg.org}) or \verb+avconv+ (\url{http://libav.org}) command line tools (Libav is a fork from the FFmpeg code). In order to allow for precise seeking within video files it is necessary to encode them with a sufficient number of key frames. The command line for recoding an existing video file \verb+video.avi+ into \verb+video.mp4+ reads (\verb+ffmpeg+ can be substituted with \verb+avconv+)
+There is yet another player bundled with `media9'. It is a simple image gallery viewer called `SlideShow.swf' which can display collections of embedded and remote images in the PNG, JPEG and GIF file formats. Remote images are downloaded at viewing time and can be configured to be refreshed at definite time intervals.
+
+Flash Player supports the efficient H.264 codec for video compression. MP4/H.264 video files can be encoded from existing video files and from numbered bitmap sequences using the \verb+ffmpeg+ (\url{http://ffmpeg.org}) or \verb+avconv+ (\url{http://libav.org}) command line tools (Libav is a fork from the FFmpeg code). In order to allow for precise seeking within video files it is necessary to encode them with a sufficient number of key frames. The command line for recoding an existing video file \verb+video.avi+ into \verb+video.mp4+ reads (one line; \verb+ffmpeg+ can be substituted with \verb+avconv+)
+\begin{center}
\begin{Verbatim}
- ffmpeg -i video.avi -c:v libx264 -g 30 -r 30 video.mp4
+ ffmpeg -i video.avi -vf scale="trunc(iw/2)*2:trunc(ih/2)*2"
+ -c:v libx264 -profile:v high -pix_fmt yuv420p -g 30 -r 30 video.mp4
\end{Verbatim}
+\end{center}
From a sequence \verb+frame-0.png+, \verb+frame-1.png+, ... of bitmap files, an MP4 video is produced by
\begin{Verbatim}
- ffmpeg -i frame-%d.png -c:v libx264 -g 30 -r 30 video.mp4
+ ffmpeg -i frame-%d.png -vf scale="trunc(iw/2)*2:trunc(ih/2)*2"
+ -c:v libx264 -profile:v high -pix_fmt yuv420p -g 30 -r 30 video.mp4
\end{Verbatim}
-Both examples insert a key frame (option `\verb+-g+') at every second since the frame rate is set to 30 fps.
+Both examples insert a key frame (option `\verb+-g+') at every second since the frame rate is set to 30 fps. The video encoder requires even pixel numbers in both dimensions which is ensured by adding `\verb+-vf scale="..."+' to the option list.
\emph{Note:} `media9' package replaces the now obsolete `movie15' package. `media9' is based on the RichMedia Annotation (Annotations are the interactive elements in a document, in PDF specification parlance.), an Adobe addition to the PDF specification~\cite{supplement}, while `movie15' uses the old multimedia framework (`Screen Annotation') of pre-9 Readers which depends on third-party plug-ins and which does not support recent media file formats.
@@ -241,7 +253,7 @@ if, for a particular media player, the video source is set through ActionScript
\begin{verbatim}
attachfiles
\end{verbatim}
-If set, embedded files can be downloaded from the PDF via the `Attachments' navigation pane in the Reader.
+If set, embedded files can be downloaded from the PDF via the \Acrobatmenu{ShowHideFileAttachment}{Attachments} navigation pane in the Reader.
\begin{verbatim}
activate=onclick | pageopen | pagevisible
\end{verbatim}
@@ -523,7 +535,7 @@ final
See \hyperlink{draftfinal}{above}.
\clearpage
-\section[Embedding Flash, video and sound (with examples)]{Embedding Flash, video and sound}
+\section[Embedding Flash, video and sound, image slide-shows (with examples)]{Embedding Flash, video and sound,\\ image slide-shows}
A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example of loading Flash content from a URL to be displayed in an embedded fashion in a PDF document. Indeed, a YouTube clip is nothing more than a small SWF file which loads a video stream and other necessary resources, such as user controls and a player skin from a remote server. It can be configured via ActionScript variables to play several videos in a row, to play a video in a loop etc. Player parameters are documented on \url{http://code.google.com/apis/youtube/player_parameters.html} and can be passed to the player using either the `\verb+flashvars+' option, as in the example, or appended to the URL string after the video ID. A question mark `\verb+?+' must be put between the video ID and the parameter string. Some of the documented parameters, such as `\verb+rel+', seem to have an effect only if they are passed as part of the URL.
\begin{figure}[H]
@@ -554,7 +566,7 @@ A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example
\caption{A YouTube video as an example of a Flash application loaded from a URL.}\label{alien}
\end{figure}
-Video and sound files are always loaded and then played by a media player application. Three players are installed along with the `media9.sty' package file: two simple players, `VPlayer.swf' for video and `APlayer.swf' for sound, and a fully blown one, `StrobeMediaPlayback.swf', with some fixes to improve its usability. The simple ones are `chromeless' players, that is, they do not have graphical user controls. Nevertheless, interactivity is provided through the keyboard, as summarized in Table \ref{kbcontrol}, and through left mouse button press and release for playing, pausing and resuming media. `VPlayer.swf' and `APlayer.swf' were compiled, using the open-source Apache Flex SDK~\cite{flex}, from XML source files which reside in the \verb+doc/+ folder of the package installation. For `StrobeMediaPlayback.swf', only a patch file is included, as the sources can be downloaded elsewhere.
+Media files (video, sound, images) are always loaded and then played by a media player application. Four players are installed along with the `media9.sty' package file: three simple players for video (`VPlayer.swf'), sound (`APlayer.swf') and slide-shows of embedded and/or remote (live or static) image files (`SlideShow.swf'), and the fully blown third-party media player `StrobeMediaPlayback.swf' with some fixes to improve its usability. The simple players are `chromeless', that is, they do not have graphical user controls. Nevertheless, interactivity is provided through left mouse button press and release for playing, pausing, resuming playback, through the player's context menu (right-click), and through the keyboard as summarized in Table \ref{kbcontrol}. The player apps were compiled using the open-source Apache Flex SDK~\cite{flex} from XML source files which reside in the \verb+doc/+ folder of the package installation. For `StrobeMediaPlayback.swf', only a patch file is included, as the sources can be downloaded elsewhere.
The improvements of `StrobeMediaPlayback.swf' in comparision to the original version on SourceForge.net are
\begin{itemize}
@@ -565,27 +577,31 @@ The improvements of `StrobeMediaPlayback.swf' in comparision to the original ver
There is no need to copy the installed players into the directory of the document source for embedding. They will be found by \LaTeX{} without taking any further action.
-Like YouTube videos, media players are configured via ActionScript variables which are passed using option `\verb+flashvars+'. Table~\ref{playerparams} lists parameters available for `VPlayer.swf' and `APlayer.swf', table~\ref{smpparams} for `StrobeMediaPlayback.swf'.
+Like YouTube videos, media players are configured via ActionScript variables which are passed using option `\verb+flashvars+'. Table~\ref{playerparams} lists parameters available for `VPlayer.swf', `APlayer.swf' and `SlideShow.swf', Table~\ref{smpparams} for `StrobeMediaPlayback.swf'.
Playback of embedded video files is shown in Fig.~\ref{videoa}. Besides embedded files, also video streamed from remote servers via HTTP and RTMP protocols is supported, as shown in Fig.~\ref{videob}.
-`VPlayer.swf' and `APlayer.swf' expose a number of ActionScript functions to the JavaScript engine of Adobe Reader, allowing for playback control of media through push buttons (see Sect. \ref{mbtn}) and various trigger events. The functions and their calling convention are listed in Table~\ref{AVPlayerMethods}. From within JavaScript, these functions can be called using the `\verb+callAS+' (=~call ActionScript) method of the \verb+AnnotRichMedia+ object. As an example, a call to the `\verb+seek+' function looks like
+Sound files and streams in the MP3 format can be played with `APlayer.swf'. Fig.~\ref{radio} contains examples of an audio live stream and a remote MP3 sound file. In one of the sound examples, the player is loaded from a CTAN mirror during runtime because an internet connection is required anyway for streaming the audio. If a local sound file is to be embedded into the PDF this would have to be done in the same way as with the video file in one of the previous examples using the `\verb+addresource+' option.
+
+The slide-show application `SlideShow.swf' requires a configuration file in the XML file format. It specifies the URLs from which the images will be loaded and may contain optional settings, such as image captions, refresh intervals for live images and initial rotation. The syntax is documented in the configuration file template in Fig.~\ref{SlideShowXML}. The file name of a configuration file is passed to `SlideShow.swf' using the `\verb+xml+' ActionScript variable. Note that for security reasons the configuration file and `SlideShow.swf' must reside on the same server or be both embedded into the PDF. Otherwise, a security error will be thrown by the Flash Player plugin. A slide-show example is shown in Fig.~\ref{slideshowex}.
+
+`VPlayer.swf', `APlayer.swf' and `SlideShow.swf' expose a number of ActionScript functions to the JavaScript engine of Adobe Reader, allowing for playback control of media through push buttons (see Sect. \ref{mbtn}) and various trigger events. The functions and their calling convention are listed in Tables~\ref{AVPlayerMethods} and~\ref{SlideShowMethods}. From within JavaScript, these functions can be called using the `\verb+callAS+' (=~call ActionScript) method of the \verb+AnnotRichMedia+ object. As an example, a call to the `\verb+seek+' function looks like
\begin{verbatim}
annotRM.myvideo.callAS("seek", 12.3);
\end{verbatim}
-and a call to the parameter-less function `\verb+pause+' like
+and a call to the parameter-less function `\verb+playPause+' like
\begin{verbatim}
- annotRM.myvideo.callAS("pause");
+ annotRM.myvideo.callAS("playPause");
\end{verbatim}
Both functions calls are sent to the media inclusion that was labelled `\verb+myvideo+' using the `\verb+label+' option of \verb+\includemedia+. An example of playing and pausing a video clip and setting the video source via interactive push buttons is given in Fig.~\ref{videoa}.
-Sound files and streams in the MP3 format can be played with `APlayer.swf'. Fig.~\ref{radio} contains examples of an audio live stream and a remote MP3 sound file. In one of the sound examples, the player is loaded from a CTAN mirror during runtime because an internet connection is required anyway for streaming the audio. If a local sound file is to be embedded into the PDF this would have to be done in the same way as with the video file in one of the previous examples using the `\verb+addresource+' option.
-%\clearpage
-
-\begin{table}
+\begin{table}[htbp]
+%\flushright
\centering
-\caption{Keyboard control of media players `VPlayer.swf' and `APlayer.swf'. The media must have the focus to have effect. Click onto the media if necessary.}\label{kbcontrol}
-\begin{tabular}[t]{rp{0.5\linewidth}}\hline
+\caption{Keyboard control of media players (a) `VPlayer.swf' \& `APlayer.swf', (b) `SlideShow.swf'. Players must have the focus to take effect. Click onto the players if necessary.}\label{kbcontrol}
+\vspace{3ex}
+(a)\\
+\begin{tabular}{rp{0.5\linewidth}}\hline
keys & action\\\hline\hline
\keys{\unexpanded{\makebox[2\width][c]{Space}}} & play/pause\\
\keys{Home}, \keys{End} & go to start/end\\
@@ -594,28 +610,49 @@ keys & action\\\hline\hline
\keys{m} & mute/unmute\\
\keys{\ctrl+\arrowkeyleft}, \keys{\ctrl+\arrowkeydown}, \keys{\ctrl+\arrowkeyright} & (APlayer.swf only) change sound speaker balance\\\hline
\end{tabular}
+
+\vspace{6ex}
+(b)\\
+\begin{tabular}{rp{0.5\linewidth}}\hline
+keys & action\\\hline\hline
+\keys{\unexpanded{\makebox[2\width][c]{Space}}} & play/pause auto-cycling through slides\\
+\keys{\arrowkeyleft}, \keys{\arrowkeyright} & previous/next slide\\
+\keys{Home}, \keys{End} & go to first/last slide\\
+\keys{r}, \keys{R} & right/left rotate current slide by \SI{90}{\degree}\\\hline
+\end{tabular}
\end{table}
-\begin{table}[bp]
+\begin{table}[tp]
\centering
-\caption{Parameters (ActionScript variables) for media players `VPlayer.swf' and `APlayer.swf' shipping with media9. Parameters are passed as a `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{playerparams}
-\begin{tabular}[t]{p{0.4\linewidth}p{0.5\linewidth}}\hline
+\caption{Parameters (ActionScript variables) for media players (a) `VPlayer.swf' \& `APlayer.swf', (b) `SlideShow.swf' shipping with media9. Parameters are passed as a `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{playerparams}
+\vspace{3ex}
+(a)\\
+\begin{tabular}[c]{p{0.4\linewidth}p{0.5\linewidth}}\hline
parameter & description\\\hline\hline
{\tt source=<file path or URL>} & (required) path to embedded media file (see option `{\tt addresource}'), or URL (http, rtmp) to online media file\\
{\tt autoPlay=true|false} & if {\tt=true}, automatically starts playback after activation (see option `{\tt activation})'\\
{\tt autoRewind=true|false} &(VPlayer.swf only) if {\tt=true}, automatically rewind to the first frame after playback has finished; default is `{\tt false}'\\
{\tt loop=true|false} & if {\tt=true}, media is played in a loop\\
{\tt stepping=true|false} &(VPlayer.swf only) if {\tt=true}, the video advances by roughly one frame per mouse click\\
-{\tt scaleMode=letterbox|none| \phantom{.}\hfill{}stretch|zoom} & default: {\tt stretch}; determines how to scale the video in order to fit into player\\
+{\tt scaleMode=letterbox|none| \phantom{.}\hfill{}stretch|zoom} & default: {\tt letterbox}; determines how to scale the video in order to fit into player\\
{\tt hideBar=true|false} &(APlayer.swf only) if {\tt=true}, the progress bar indicating the play position is not shown\\
{\tt volume=<value between 0.0 \phantom{.}\hfill{}and 1.0>} & sets volume of the sound\\
{\tt balance=<value between \phantom{xxxx} \phantom{.}\hfill{}-1.0 and 1.0>} & (APlayer.swf only) sets balance of sound speakers\\\hline
\end{tabular}
+
+\vspace{6ex}
+(b)\\
+\begin{tabular}[c]{p{0.4\linewidth}p{0.5\linewidth}}\hline
+parameter & description\\\hline\hline
+{\tt xml=<file path or URL>} & (required) path to embedded (option `{\tt addresource}') or URL of remote configuration file\\
+{\tt delay=<number>} & sets time delay in seconds for transition between slides during playback, default: \SI{5}{\second}\\
+{\tt autoPlay=true|false} & if {\tt=true}, automatically starts cycling through slides after activation (see option `{\tt activation})'\\\hline
+\end{tabular}
\end{table}
-\begin{table}[bp]
+\begin{table}%[bp]
\centering
-\caption{Exposed ActionScript functions of media players `VPlayer.swf' and `APlayer.swf', that can be called from within media buttons (see Sect. \ref{mbtn}) or from JavaScript using the `{\tt callAS}' method of the `{\tt AnnotRichMedia}' JavaScript object (see~\cite{jscript} for further information).}\label{AVPlayerMethods}
+\caption{Exposed ActionScript functions of media players `VPlayer.swf' and `APlayer.swf' that can be called from within media buttons (see Sect. \ref{mbtn}) or from JavaScript using the `{\tt callAS}' method of the `{\tt AnnotRichMedia}' JavaScript object (see~\cite{jscript} for further information).}\label{AVPlayerMethods}
\begin{tabular}[t]{lp{0.25\linewidth}p{0.5\linewidth}}\hline
function & argument &description\\\hline\hline
{\tt play} & number (optional) & play media, optionally starting at \emph{number} seconds offset into the media file\\
@@ -635,6 +672,23 @@ function & argument &description\\\hline\hline
\end{tabular}
\end{table}
+\begin{table}%[bp]
+\centering
+\caption{Exposed ActionScript functions of slide-show player `SlideShow.swf' that can be called from within media buttons or from JavaScript.}\label{SlideShowMethods}
+\begin{tabular}[t]{lp{0.21\linewidth}p{0.47\linewidth}}\hline
+function & argument &description\\\hline\hline
+{\tt play} & & play slide-show\\
+{\tt pause} & & pause slide-show\\
+{\tt playPause} & & toggle between play and pause\\
+{\tt setXML} & string & load another configuration file (path to file, embedded using option `{\tt addresource}', or URL)\\
+{\tt seek} & int number & go to slide `number', zero-based\\
+{\tt slideNum} & & returns current slide number, zero-based; only useful in JavaScript via `{\tt callAS}' method\\
+{\tt numSlides} & & returns total number of slides in the slide-show; only useful in JavaScript via `{\tt callAS}' method\\
+{\tt playing} & & returns boolean value `{\tt true}', if the media is currently playing, `{\tt true}' otherwise; only useful in JavaScript via `{\tt callAS}' method\\
+{\tt rotate} & int number (optional) & rotate current slide by number$\times\SI{90}{\degree}$\\\hline
+\end{tabular}
+\end{table}
+
\begin{table}[bp]
\centering
\caption{Parameters (ActionScript variables) for `StrobeMediaPlayback.swf' shipping with media9. Parameters are passed as a `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{smpparams}
@@ -657,7 +711,7 @@ parameter & description\\\hline\hline
\end{tabular}
\end{table}
-\begin{figure}[bp]
+\begin{figure}[p]
\centering
\begin{Verbatim}
\includemedia[
@@ -667,10 +721,10 @@ parameter & description\\\hline\hline
addresource=cube.mp4,
transparent, %transparent player background
activate=pageopen,
+ passcontext, %show VPlayer's right-click menu
flashvars={
source=random.mp4
&loop=true % loop video
- &scaleMode=letterbox % preserve aspect ratio while scaling the video
}
]{}{VPlayer.swf}
@@ -694,10 +748,11 @@ parameter & description\\\hline\hline
addresource=cube.mp4,
transparent, %transparent player background
activate=pageopen,
+ passcontext, %show VPlayer's right-click menu
flashvars={
source=random.mp4
&loop=true % loop video
- &scaleMode=letterbox % preserve aspect ratio while scaling the video
+ &autoPlay=true
}
]{}{VPlayer.swf}\hfill}
\makebox[\linewidth]{\hfill%
@@ -713,7 +768,45 @@ parameter & description\\\hline\hline
mediacommand=some_dice:setSource [(cube.mp4)]
]{\fbox{\strut cube.mp4}}
\hfill}
-\caption{Example of playing back two different embedded MP4 video files in the same video player instance. The player, `VPlayer.swf', is also embedded in the PDF. Exposed ActionScript functions `{\tt playPause}' and `{\tt setSource}' of `VPlayer.swf' (Table~\ref{AVPlayerMethods}) are used to set-up media control buttons. Different button faces have been defined for the Play/Pause button.}\label{videoa}
+\caption{Example of playing back two different embedded MP4 video files in the same video player instance. The player, `VPlayer.swf', is also embedded in the PDF. Exposed ActionScript functions `{\tt playPause}' and `{\tt setSource}' of `VPlayer.swf' (Table~\ref{AVPlayerMethods}) are used to set-up media control buttons. Different button faces have been defined for the Play/Pause button. Also, playback can be contolled via the player's context (right-click) menu or the keyboard.}\label{videoa}
+\end{figure}
+
+\begin{figure}%[bp]
+\centering
+%\lstinputlisting[basicstyle=\scriptsize\ttfamily,language=XML]{config.xml}
+\inputminted[fontsize=\footnotesize]{xml}{test/config.xml}
+\caption{Configuration file template (XML format) for `SlideShow.swf'}\label{SlideShowXML}
+\end{figure}
+
+\makeatletter%
+\def\myAcrobatmenu#1#2{\leavevmode\pdfstartlink attr{\Hy@setpdfborder\ifx\@pdfhighlight\@empty\else/H\@pdfhighlight\fi\ifx\@menubordercolor\relax\else/C[\@menubordercolor]\fi} user{/Subtype/Link\ifHy@pdfa/F4\fi/A<</S/Named/N/#1>>}\relax\Hy@colorlink\@menucolor#2\close@pdflink}\makeatother
+\savebox{\COO}{\keys{\shift+}}
+\savebox{\CtoC}{\keys{\unexpanded{\makebox[2\width][c]{Space}}}}
+\begin{figure}[bp]
+\centering
+\begin{Verbatim}
+\includemedia[
+ width=\linewidth,height=\linewidth,
+ activate=pageopen,
+ addresource=config.xml, %embedded configuration
+ addresource=files/ctan_lion_350x350.png, %embedded image file
+ flashvars={xml=config.xml},
+ passcontext %show the player's context menu
+]{}{SlideShow.swf}
+\end{Verbatim}
+\vspace{1ex}
+\makebox[\linewidth]{\hfill%
+\includemedia[
+% width=0.8\linewidth,height=0.6\linewidth,
+ width=\linewidth,height=\linewidth,
+ activate=pageopen,
+ addresource=config.xml, %embedded configuration
+ addresource=files/ctan_lion_350x350.png, %embedded image file
+ flashvars={xml=config.xml},
+ passcontext %show the player's context menu
+]{}{SlideShow.swf}
+\hfill}
+\caption{Slide-show example with one embedded and several remote image files, some of which are live images. The listing in Fig.~\ref{SlideShowXML} is used as content of file \myAcrobatmenu{ShowHideFileAttachment}{`config.xml'}. Manually cycle forwards through the images by mouse-click or backwards by \usebox{\COO}+mouse-click. Play/pause auto-cycling through the slide-show by hitting \usebox{\CtoC}. Also, the context (right-click) menu of the player can be used.}\label{slideshowex}
\end{figure}
\begin{figure}[bp]
@@ -743,6 +836,7 @@ parameter & description\\\hline\hline
\begin{figure}[bp]
%\flushright
+{\small%
\begin{Verbatim}
\includemedia[
addresource=bird.mp3,
@@ -750,48 +844,56 @@ parameter & description\\\hline\hline
source=bird.mp3
&autoPlay=true
},
- transparent
+ transparent,
+ passcontext %show APlayer's right-click menu
]{\color{blue}\framebox[0.4\linewidth][c]{Singing bird}}{APlayer.swf}
\end{Verbatim}
-\makebox[\linewidth]{a)\hfill\includemedia[
+}
+\makebox[\linewidth]{(a)\hfill\includemedia[
addresource=bird.mp3,
flashvars={
source=bird.mp3
&autoPlay=true
},
- transparent
+ transparent,
+ passcontext %show APlayer's right-click menu
]{\color{blue}\framebox[0.5\linewidth][c]{Singing bird}}{APlayer.swf}
\hfill}
-\vskip 4ex\begin{Verbatim}
+\vskip 4ex{\small\begin{Verbatim}
\includemedia[
flashvars={
source=http://mp3.live.tv-radio.com/franceculture%
/all/franceculturehautdebit.mp3
&autoPlay=true
},
- transparent
+ transparent,
+ passcontext %show APlayer's right-click menu
]{\color{blue}\fbox{Listen live to Radio France Culture}}{%
http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/%
contrib/media9/players/APlayer.swf%
}
\end{Verbatim}
-\makebox[\linewidth]{b)\hfill\includemedia[
+}
+\makebox[\linewidth]{(b)\hfill\includemedia[
flashvars={
source=http://mp3.live.tv-radio.com/franceculture/all/franceculturehautdebit.mp3
&autoPlay=true
},
- transparent
+ transparent,
+ passcontext %show APlayer's right-click menu
]{\color{blue}\fbox{Listen live to Radio France Culture}}{%
%APlayer.swf%
%http://mirror.ctan.org/macros/latex/contrib/media9/players/APlayer.swf%
http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/APlayer.swf%
}\hfill}
\vskip 4ex
+{\small%
\begin{Verbatim}
\includemedia[
label=song49,
flashvars={source=http://www.openbsd.org/songs/song49.mp3},
- transparent
+ transparent,
+ passcontext %show VPlayer's right-click menu
]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song}}{APlayer.swf}\\
\mediabutton[
mediacommand=song49:play[(5.5)],
@@ -806,14 +908,16 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
mediacommand=song49:pause[(221)]
]{\fbox{Harmonica solo}}
\end{Verbatim}
+}
\makebox[\linewidth]{\rule{0pt}{1.5\baselineskip}\hfill\includemedia[
label=song49,
flashvars={
source=http://www.openbsd.org/songs/song49.mp3
},
- transparent
+ transparent,
+ passcontext %show VPlayer's right-click menu
]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song}}{APlayer.swf}\hfill}\\
-\makebox[\linewidth]{\makebox[0pt][l]{c)}\hfill%
+\makebox[\linewidth]{\makebox[0pt][l]{(c)}\hfill%
\mediabutton[
mediacommand=song49:play[(5.5)],
mediacommand=song49:pause[(37)]
@@ -840,7 +944,8 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
source=cube.mp4
&autoPlay=true % start playing on activation
&loop=true
- }
+ },
+ passcontext %show player's right-click menu
]{\includegraphics[height=0.45\linewidth]{cubeposter}}{VPlayer9.swf}
\end{Verbatim}
\vspace{1ex}
@@ -851,7 +956,8 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
source=cube.mp4
&autoPlay=true %start playing on activation
&loop=true
- }
+ },
+ passcontext %show player's right-click menu
]{\includegraphics[height=0.45\linewidth]{cubeposter}}{VPlayer9.swf}\hfill
\vspace{2ex}
\begin{Verbatim}
@@ -861,7 +967,8 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
source=bird.mp3
&autoPlay=true
},
- transparent
+ transparent,
+ passcontext %show player's right-click menu
]{\color{blue}\framebox[0.4\linewidth][c]{Singing bird}}{APlayer9.swf}
\end{Verbatim}
\vspace{1ex}
@@ -871,7 +978,8 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
source=bird.mp3
&autoPlay=true
},
- transparent
+ transparent,
+ passcontext %show player's right-click menu
]{\color{blue}\framebox[0.5\linewidth][c]{Singing bird}}{APlayer9.swf}\hfill
\vspace{2ex}
\caption{Video and sound examples that should run in Adobe Reader for Linux up to version \href{ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.4.1/}{9.4.1}. Here, players `VPlayer9.swf' and `APlayer9.swf' are used. Both are compatible with Adobe Flash Player 9 plugin that is bundled with the Reader. Also, the video player needs to be activated by mouse click (which is the default). We provide a poster image that is shown in the inactive state.}\label{ar941ex}